Class: CreateSongRefTable

Inherits:
Object
  • Object
show all
Defined in:
lib/gdshowsdb/db/migrations/001_create_song_ref_table.rb

Instance Method Summary collapse

Instance Method Details

#downObject



12
13
14
# File 'lib/gdshowsdb/db/migrations/001_create_song_ref_table.rb', line 12

def down
	drop_table :song_refs
end

#upObject



2
3
4
5
6
7
8
9
10
# File 'lib/gdshowsdb/db/migrations/001_create_song_ref_table.rb', line 2

def up
	create_table :song_refs, :id => false do |t|
		t.string :uuid, :primary => true, :null => false
		t.string :name
     t.string :slug      
	end

   add_index :song_refs, [:uuid, :name, :slug]     
end