Class: CreateDurations
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateDurations
- Defined in:
- lib/watch_tower/server/db/migrate/004_create_durations.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/watch_tower/server/db/migrate/004_create_durations.rb', line 4 def change create_table :durations do |t| t.references :file, null: false t.date :date, null: false t.integer :duration, default: 0 t. end add_index :durations, :file_id add_index :durations, :date end |