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



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

def down
  drop_table :song_refs
end

#upObject



2
3
4
5
6
7
8
9
10
11
# 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  
    t.index :uuid, unique: true  
    t.index :name, unique: true  
    t.index :slug, unique: true  
  end    
end