Class: CreateBites
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateBites
- Defined in:
- lib/generators/bites/install/templates/create_bites.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
11 12 13 |
# File 'lib/generators/bites/install/templates/create_bites.rb', line 11 def down drop_table :bites end |
#up ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/bites/install/templates/create_bites.rb', line 2 def up create_table :bites do |t| t.string :identifier, null: false t.text :text, null: false, default: "" end add_index :bites, :identifier, unique: true end |