Class: CreateSongTable

Inherits:
Object
  • Object
show all
Defined in:
lib/gdshowsdb/db/migrations/005_create_song_table.rb

Instance Method Summary collapse

Instance Method Details

#downObject



15
16
17
# File 'lib/gdshowsdb/db/migrations/005_create_song_table.rb', line 15

def down
  drop_table :songs
end

#upObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/gdshowsdb/db/migrations/005_create_song_table.rb', line 3

def up
  create_table :songs, :id => false do |t|
    t.string :uuid, :primary => true, :null => false
    t.string :show_set_uuid
    t.string :song_ref_uuid
    t.integer :position
    t.boolean :segued     
    t.index :uuid, unique: true
    t.index :song_ref_uuid
  end
end