Sha256: e7af9ab471bbb2b6f3ddcd08589903765b062d2c463c39d26069e53c108b59c9
Contents?: true
Size: 307 Bytes
Versions: 5
Compression:
Stored size: 307 Bytes
Contents
class CreatePosts < ActiveRecord::Migration def self.up create_table :posts do |t| t.string :name t.text :body t.timestamps end add_index :posts, :name, length: 255, unique: true # explicit length is required for MySQL end def self.down drop_table :posts end end
Version data entries
5 entries across 5 versions & 1 rubygems