initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
Sequel.migration do
|
||||
change do
|
||||
create_table(:encounters) do
|
||||
primary_key :id
|
||||
|
||||
Integer :percentage
|
||||
TrueClass :static
|
||||
String :location, null: false, index: true
|
||||
|
||||
foreign_key :pokemon_id, :pokemon, null: false, on_delete: :cascade
|
||||
foreign_key :version_id, :versions, null: false, on_delete: :cascade
|
||||
end
|
||||
|
||||
alter_table(:hunts) do
|
||||
drop_column :pokemon_id
|
||||
add_foreign_key :enounter_id, :encounters
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user