Class: CreateShowSetTable

Inherits:
Object
  • Object
show all
Defined in:
lib/gdshowsdb/db/migrations/004_create_show_set_table.rb

Instance Method Summary collapse

Instance Method Details

#downObject



14
15
16
# File 'lib/gdshowsdb/db/migrations/004_create_show_set_table.rb', line 14

def down
	drop_table :show_sets
end

#upObject



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

def up
	create_table :show_sets, :id => false do |t|
		t.string :uuid, :primary => true, :null => false
		t.string :show_uuid
		t.integer :position
		t.boolean :encore, :default => false
		t.index :uuid, unique: true
		t.index [:uuid, :show_uuid, :position], unique: true
	end
end