Files
fullodds.club/lib/full_odds/db/migrations/20261024231937_migration.rb
T
2026-10-25 23:19:29 -06:00

20 lines
469 B
Ruby

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