Class: CreateSimpleContents

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/happy_seed/simple_cms/templates/create_simple_contents.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/happy_seed/simple_cms/templates/create_simple_contents.rb', line 2

def change
  create_table :simple_contents do |t|
    t.string :key
    t.string :title
    t.text :body
    t.integer :priority

    t.timestamps
  end

  add_index :simple_contents, :key
end