Class: CreateContentBuilders

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/templates/create_content_builder_migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/templates/create_content_builder_migration.rb', line 2

def change
  create_table :content_builders do |t|
    t.string :title
    t.string :written_by
    t.datetime :date_publish
    t.text :content
    t.boolean :status, default: false
    t.string :slug
    t.text :summary
    t.references :content_builder_category, index: true, foreign_key: true

    t.timestamps null: false
  end
end