Class: CreateSongOccurencesTable
- Inherits:
-
Object
- Object
- CreateSongOccurencesTable
- Defined in:
- lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
15 16 17 |
# File 'lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb', line 15 def down drop_table :song_occurences end |
#up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb', line 3 def up create_table :song_occurences, :id => false do |t| t.string :uuid, :primary => true, :null => false t.string :show_uuid t.string :song_ref_uuid t.integer :position t.index :uuid, unique: true t.index :song_ref_uuid t.index [:show_uuid, :song_ref_uuid, :position], unique: true, name: 'unique_song_occurences_for_show' end end |