Class: CreateRcmsTidingsTables
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateRcmsTidingsTables
- Defined in:
- lib/generators/templates_tidings/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/templates_tidings/migration.rb', line 16 def self.down drop_table :rcms_tidings end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/templates_tidings/migration.rb', line 2 def self.up create_table :rcms_tidings do |t| t.string :image t.string :title t.string :description t.string :slug t.boolean :is_published t.text :text t. end add_index :rcms_tidings, :slug, unique: true end |