Class: CreateSongOccurencesTable

Inherits:
Object
  • Object
show all
Defined in:
lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb

Instance Method Summary collapse

Instance Method Details

#downObject



14
15
16
# File 'lib/gdshowsdb/db/migrations/006_create_song_occurences_table.rb', line 14

def down
  drop_table :song_occurences
end

#upObject



3
4
5
6
7
8
9
10
11
12
# 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      
  end

  add_index :song_occurences, [:uuid, :song_ref_uuid]
end