BEGIN; CREATE TABLE "pokemon_v2_language" ("id" serial NOT NULL PRIMARY KEY, "iso639" varchar(2) NOT NULL, "iso3166" varchar(2) NOT NULL, "name" varchar(10) NOT NULL, "official" boolean NOT NULL, "order" integer NOT NULL); CREATE TABLE "pokemon_v2_languagename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_generation" ("id" serial NOT NULL PRIMARY KEY, "main_region_id" integer NOT NULL, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_generationname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "generation_id" integer NULL); CREATE TABLE "pokemon_v2_ability" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "is_main_series" boolean NOT NULL, "generation_id" integer NULL); CREATE TABLE "pokemon_v2_abilityflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(100) NOT NULL, "ability_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_abilityname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "ability_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_version" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_versiongroup" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "order" integer NOT NULL, "generation_id" integer NULL); CREATE TABLE "pokemon_v2_versiongroupregion" ("id" serial NOT NULL PRIMARY KEY, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_versionname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "version_id" integer NULL); ALTER TABLE "pokemon_v2_version" ADD COLUMN "version_group_id" integer NULL; ALTER TABLE "pokemon_v2_version" ALTER COLUMN "version_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" ADD COLUMN "version_group_id" integer NULL; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "version_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_generationname" ADD COLUMN "language_id" integer NULL; ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "language_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" TYPE varchar(30); ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "official" SET DEFAULT false; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "official" DROP DEFAULT; CREATE TABLE "pokemon_v2_type" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "damage_class_id" integer NOT NULL, "generation_id" integer NULL); CREATE TABLE "pokemon_v2_typegameindex" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "generation_id" integer NULL, "type_id" integer NULL); CREATE TABLE "pokemon_v2_typename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "type_id" integer NULL); CREATE TABLE "pokemon_v2_typeefficacy" ("id" serial NOT NULL PRIMARY KEY, "damage_factor" integer NOT NULL); CREATE TABLE "pokemon_v2_nature" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "hates_flavor_id" integer NOT NULL, "likes_flavor_id" integer NOT NULL, "game_index" integer NOT NULL); CREATE TABLE "pokemon_v2_naturebattlestylepreference" ("id" serial NOT NULL PRIMARY KEY, "low_hp_preference" integer NOT NULL, "high_hp_preference" integer NOT NULL, "nature_id" integer NULL); CREATE TABLE "pokemon_v2_stat" ("id" serial NOT NULL PRIMARY KEY, "damage_class_id" integer NULL, "name" varchar(30) NOT NULL, "is_battle_only" boolean NOT NULL, "game_index" integer NOT NULL); CREATE TABLE "pokemon_v2_statname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "stat_id" integer NULL); ALTER TABLE "pokemon_v2_nature" ADD COLUMN "decreased_stat_id" integer NULL; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "decreased_stat_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" ADD COLUMN "increased_stat_id" integer NULL; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "increased_stat_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" DROP COLUMN "damage_class_id" CASCADE; CREATE TABLE "pokemon_v2_naturename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "nature_id" integer NULL); CREATE TABLE "pokemon_v2_naturepokeathlonstat" ("id" serial NOT NULL PRIMARY KEY, "max_change" integer NOT NULL, "nature_id" integer NULL); CREATE TABLE "pokemon_v2_characteristic" ("id" serial NOT NULL PRIMARY KEY, "gene_mod_5" integer NOT NULL, "stat_id" integer NULL); CREATE TABLE "pokemon_v2_characteristicdescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "characteristic_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_egggroup" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_egggroupname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "egg_group_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_growthrate" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "formula" varchar(500) NOT NULL); CREATE TABLE "pokemon_v2_growthratedescription" ("id" serial NOT NULL PRIMARY KEY, "growth_rate_id" integer NULL, "language_id" integer NULL, "description" varchar(1000) NOT NULL); CREATE TABLE "pokemon_v2_move" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL, "power" integer NOT NULL, "pp" integer NOT NULL, "accuracy" integer NOT NULL, "priority" integer NOT NULL, "move_effect_chance" integer NOT NULL, "contest_type_id" integer NOT NULL, "contest_effect_id" integer NOT NULL, "super_contest_effect_id" integer NOT NULL, "generation_id" integer NULL); CREATE TABLE "pokemon_v2_movebattlestyle" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_movebattlestylename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_battle_style_id" integer NULL); CREATE TABLE "pokemon_v2_movechange" ("id" serial NOT NULL PRIMARY KEY, "power" integer NOT NULL, "pp" integer NOT NULL, "accuracy" integer NOT NULL, "move_effect_chance" integer NOT NULL, "move_id" integer NULL); CREATE TABLE "pokemon_v2_movedamageclass" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_movedamageclassdescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "move_damage_class_id" integer NULL); CREATE TABLE "pokemon_v2_moveeffect" ("id" serial NOT NULL PRIMARY KEY); CREATE TABLE "pokemon_v2_moveeffectchange" ("id" serial NOT NULL PRIMARY KEY, "move_effect_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_moveattribute" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_moveflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(500) NOT NULL, "language_id" integer NULL, "move_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_movemeta" ("id" serial NOT NULL PRIMARY KEY, "min_hits" integer NOT NULL, "max_hits" integer NOT NULL, "min_turns" integer NOT NULL, "max_turns" integer NOT NULL, "drain" boolean NOT NULL, "healing" boolean NOT NULL, "crit_rate" integer NOT NULL, "ailment_chance" integer NOT NULL, "flinch_chance" integer NOT NULL, "stat_chance" integer NOT NULL); CREATE TABLE "pokemon_v2_movemetaailment" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_movemetaailmentname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_meta_ailment_id" integer NULL); CREATE TABLE "pokemon_v2_movemetacategory" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_movemetacategorydescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "move_meta_category_id" integer NULL); CREATE TABLE "pokemon_v2_movemetastatchange" ("id" serial NOT NULL PRIMARY KEY, "change" integer NOT NULL, "move_id" integer NULL, "stat_id" integer NULL); CREATE TABLE "pokemon_v2_movename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_id" integer NULL); CREATE TABLE "pokemon_v2_movetarget" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(30) NOT NULL); CREATE TABLE "pokemon_v2_movetargetdescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "move_target_id" integer NULL); ALTER TABLE "pokemon_v2_movemeta" ADD COLUMN "move_meta_category_id" integer NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "move_meta_category_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ADD COLUMN "move_id" integer NOT NULL UNIQUE; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "move_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ADD COLUMN "move_meta_ailment_id" integer NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "move_meta_ailment_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ADD COLUMN "move_effect_id" integer NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "move_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ADD COLUMN "type_id" integer NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ADD COLUMN "version_group_id" integer NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "version_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "move_damage_class_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "move_effect_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "move_target_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_target_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "type_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "accuracy" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "accuracy" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_effect_chance" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_effect_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "power" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "power" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "pp" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "pp" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "priority" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "priority" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_effect_id" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_type_id" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "super_contest_effect_id" DROP NOT NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "super_contest_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "flavor_text" TYPE varchar(200); ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "flavor_text" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "accuracy" DROP NOT NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "accuracy" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "move_effect_chance" DROP NOT NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "move_effect_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "power" DROP NOT NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "power" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "pp" DROP NOT NULL; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "pp" DROP DEFAULT; ALTER TABLE "pokemon_v2_ability" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_ability" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_egggroup" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_egggroup" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_growthrate" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_growthrate" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_move" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movebattlestyle" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_movebattlestyle" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movedamageclass" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_movedamageclass" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemetaailment" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_movemetaailment" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemetacategory" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_movemetacategory" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movetarget" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_movetarget" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_type" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_version" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_version" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "name" TYPE varchar(40); ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_ability" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_ability" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_egggroup" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_egggroup" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_growthrate" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_growthrate" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_language" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_move" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movebattlestyle" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_movebattlestyle" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movedamageclass" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_movedamageclass" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemetaailment" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_movemetaailment" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemetacategory" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_movemetacategory" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movetarget" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_movetarget" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_type" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_version" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_version" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "name" TYPE varchar(100); ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "ailment_chance" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "ailment_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "crit_rate" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "crit_rate" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "flinch_chance" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "flinch_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_hits" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_hits" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_turns" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_turns" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_hits" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_hits" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_turns" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_turns" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "stat_chance" DROP NOT NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "stat_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" DROP COLUMN "drain" CASCADE; ALTER TABLE "pokemon_v2_movemeta" DROP COLUMN "healing" CASCADE; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "ailment_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "crit_rate" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "flinch_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_hits" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "max_turns" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_hits" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "min_turns" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "stat_chance" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ADD COLUMN "drain" integer NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "drain" DROP DEFAULT; ALTER TABLE "pokemon_v2_movemeta" ADD COLUMN "healing" integer NULL; ALTER TABLE "pokemon_v2_movemeta" ALTER COLUMN "healing" DROP DEFAULT; ALTER TABLE "pokemon_v2_stat" DROP COLUMN "damage_class_id" CASCADE; ALTER TABLE "pokemon_v2_stat" ADD COLUMN "move_damage_class_id" integer NULL; ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" ADD COLUMN "move_damage_class_id" integer NULL; ALTER TABLE "pokemon_v2_type" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_abilitychange" ("id" serial NOT NULL PRIMARY KEY, "ability_id" integer NULL); CREATE TABLE "pokemon_v2_evolutionchain" ("id" serial NOT NULL PRIMARY KEY, "baby_evolution_item" integer NOT NULL); CREATE TABLE "pokemon_v2_evolutiontrigger" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_evolutiontriggername" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "evolution_trigger_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_experience" ("id" serial NOT NULL PRIMARY KEY, "level" integer NOT NULL, "experience" integer NOT NULL, "growth_rate_id" integer NULL); CREATE TABLE "pokemon_v2_gender" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_pokedex" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "region_id" integer NULL, "is_main_series" boolean NOT NULL); CREATE TABLE "pokemon_v2_pokedexdescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "pokedex_id" integer NULL); CREATE TABLE "pokemon_v2_pokedexversiongroup" ("id" serial NOT NULL PRIMARY KEY, "pokedex_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_pokemon" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "order" integer NOT NULL, "height" integer NOT NULL, "weight" integer NOT NULL, "base_experience" integer NOT NULL, "is_default" boolean NOT NULL); CREATE TABLE "pokemon_v2_pokemonability" ("id" serial NOT NULL PRIMARY KEY, "is_hidden" boolean NOT NULL, "slot" integer NOT NULL, "ability_id" integer NULL, "pokemon_id" integer NULL); CREATE TABLE "pokemon_v2_pokemoncolor" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_pokemoncolorname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "pokemon_color_id" integer NULL); CREATE TABLE "pokemon_v2_pokemondexnumber" ("id" serial NOT NULL PRIMARY KEY, "pokedex_number" integer NOT NULL, "pokedex_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonegggroup" ("id" serial NOT NULL PRIMARY KEY, "egg_group_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonevolution" ("id" serial NOT NULL PRIMARY KEY, "item" integer NOT NULL, "min_level" integer NOT NULL, "location_id" integer NOT NULL, "held_item" integer NOT NULL, "time_of_day" varchar(10) NOT NULL, "min_happiness" integer NOT NULL, "minimum_beauty" integer NOT NULL, "min_affection" integer NOT NULL, "relative_physical_stats" integer NOT NULL, "needs_overworld_rain" boolean NOT NULL, "turn_upside_down" boolean NOT NULL, "evolution_trigger_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonform" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "order" integer NOT NULL, "form_identifier" varchar(30) NOT NULL, "is_default" boolean NOT NULL, "is_battle_only" boolean NOT NULL, "is_mega_form_order" boolean NOT NULL, "version_group_id" integer NULL, "pokemon_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonformgeneration" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "generation_id" integer NULL, "pokemon_form_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonformname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "pokemon_name" varchar(30) NOT NULL, "language_id" integer NULL, "pokemon_form_id" integer NULL); CREATE TABLE "pokemon_v2_pokemongameindex" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "pokemon_id" integer NULL, "version_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonhabitat" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_pokemonhabitatname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "pokemon_habitat_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonitem" ("id" serial NOT NULL PRIMARY KEY, "rarity" integer NOT NULL, "pokemon_id" integer NULL, "version_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonmove" ("id" serial NOT NULL PRIMARY KEY, "order" integer NULL, "level" integer NOT NULL, "move_id" integer NULL, "pokemon_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_movelearnmethod" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_movelearnmethodname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_learn_method_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonshape" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_pokemonshapename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "awesome_name" varchar(30) NOT NULL, "language_id" integer NULL, "pokemon_shape_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonspecies" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "order" integer NOT NULL, "gender_rate" integer NOT NULL, "capture_rate" integer NOT NULL, "base_happiness" integer NOT NULL, "is_baby" boolean NOT NULL, "hatch_counter" integer NOT NULL, "has_gender_differences" boolean NOT NULL, "forms_switchable" boolean NOT NULL, "evolution_chain_id" integer NULL, "evolves_from_species_id" integer NULL, "generation_id" integer NULL, "growth_rate_id" integer NULL, "pokemon_color_id" integer NULL, "pokemon_habitat_id" integer NULL, "pokemon_shape_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonspeciesdescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "pokemon_species_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonspeciesflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(500) NOT NULL, "language_id" integer NULL, "pokemon_species_id" integer NULL, "version_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonspeciesname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "genus" varchar(30) NOT NULL, "language_id" integer NULL, "pokemon_species_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonstat" ("id" serial NOT NULL PRIMARY KEY, "base_stat" integer NOT NULL, "effort" integer NOT NULL, "pokemon_id" integer NULL, "stat_id" integer NULL); CREATE TABLE "pokemon_v2_pokemontype" ("id" serial NOT NULL PRIMARY KEY, "slot" integer NOT NULL, "pokemon_id" integer NULL, "type_id" integer NULL); ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "evolved_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "evolved_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "gender_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "gender_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "known_move_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "known_move_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "known_move_type_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "known_move_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "party_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "party_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "party_type_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "party_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "trade_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "trade_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonegggroup" ADD COLUMN "pokemon_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonegggroup" ALTER COLUMN "pokemon_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemondexnumber" ADD COLUMN "pokemon_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemondexnumber" ALTER COLUMN "pokemon_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemon" ADD COLUMN "pokemon_species_id" integer NULL; ALTER TABLE "pokemon_v2_pokemon" ALTER COLUMN "pokemon_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "forms_switchable" SET DEFAULT false; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "forms_switchable" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "has_gender_differences" SET DEFAULT false; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "has_gender_differences" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "is_baby" SET DEFAULT false; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "is_baby" DROP DEFAULT; ALTER TABLE "pokemon_v2_evolutionchain" RENAME COLUMN "baby_evolution_item" TO "baby_evolution_item_id"; ALTER TABLE "pokemon_v2_evolutionchain" ALTER COLUMN "baby_evolution_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_evolutionchain" DROP COLUMN "baby_evolution_item_id" CASCADE; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "flavor_text" TYPE varchar(500); ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "flavor_text" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" RENAME COLUMN "minimum_beauty" TO "min_beauty"; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_beauty" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" RENAME COLUMN "item" TO "evolution_item_id"; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "evolution_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" RENAME COLUMN "held_item" TO "held_item_id"; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "held_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" DROP COLUMN "evolution_item_id" CASCADE; ALTER TABLE "pokemon_v2_pokemonevolution" DROP COLUMN "held_item_id" CASCADE; ALTER TABLE "pokemon_v2_pokemonevolution" DROP COLUMN "location_id" CASCADE; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_affection" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_affection" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_beauty" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_beauty" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_happiness" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_happiness" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "relative_physical_stats" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "relative_physical_stats" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_level" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "min_level" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "time_of_day" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "time_of_day" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonform" RENAME COLUMN "is_mega_form_order" TO "is_mega"; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "is_mega" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonform" ADD COLUMN "form_order" integer NULL; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "form_order" DROP DEFAULT; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "order" DROP NOT NULL; ALTER TABLE "pokemon_v2_language" ALTER COLUMN "order" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemon" ALTER COLUMN "order" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemon" ALTER COLUMN "order" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "order" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "order" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "order" DROP NOT NULL; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "order" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "order" DROP NOT NULL; ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "order" DROP DEFAULT; CREATE TABLE "pokemon_v2_machine" ("id" serial NOT NULL PRIMARY KEY, "machine_number" integer NOT NULL, "growth_rate_id" integer NULL, "move_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_item" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "cost" integer NULL, "fling_power" integer NULL); CREATE TABLE "pokemon_v2_itemcategory" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_itemcategoryname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "item_category_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_itemattribute" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_itemflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(500) NOT NULL, "item_id" integer NULL, "language_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_itemflingeffect" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_itemgameindex" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "generation_id" integer NULL, "item_id" integer NULL); CREATE TABLE "pokemon_v2_itemname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "item_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_itempocket" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_itempocketname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "item_pocket_id" integer NULL, "language_id" integer NULL); ALTER TABLE "pokemon_v2_itemcategory" ADD COLUMN "item_pocket_id" integer NULL; ALTER TABLE "pokemon_v2_itemcategory" ALTER COLUMN "item_pocket_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_item" ADD COLUMN "item_category_id" integer NULL; ALTER TABLE "pokemon_v2_item" ALTER COLUMN "item_category_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_item" ADD COLUMN "item_fling_effect_id" integer NULL; ALTER TABLE "pokemon_v2_item" ALTER COLUMN "item_fling_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_evolutionchain" ADD COLUMN "baby_trigger_item_id" integer NULL; ALTER TABLE "pokemon_v2_evolutionchain" ALTER COLUMN "baby_trigger_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_machine" ADD COLUMN "item_id" integer NULL; ALTER TABLE "pokemon_v2_machine" ALTER COLUMN "item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "evolution_item_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "evolution_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "held_item_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "held_item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonitem" ADD COLUMN "item_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonitem" ALTER COLUMN "item_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_berry" ("id" serial NOT NULL PRIMARY KEY, "natural_gift_power" integer NOT NULL, "size" integer NOT NULL, "max_harvest" integer NOT NULL, "growth_time" integer NOT NULL, "soil_dryness" integer NOT NULL, "smoothness" integer NOT NULL); CREATE TABLE "pokemon_v2_berryfirmness" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_berryfirmnessname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "berry_firmness_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_berryflavor" ("id" serial NOT NULL PRIMARY KEY, "flavor" integer NOT NULL); CREATE TABLE "pokemon_v2_contestcombo" ("id" serial NOT NULL PRIMARY KEY, "first_move_id" integer NULL, "second_move_id" integer NULL); CREATE TABLE "pokemon_v2_contesteffect" ("id" serial NOT NULL PRIMARY KEY, "appeal" integer NOT NULL, "jam" integer NOT NULL); CREATE TABLE "pokemon_v2_contesttype" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_contesttypename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "flavor" varchar(10) NOT NULL, "color" varchar(10) NOT NULL, "contest_type_id" integer NULL, "language_id" integer NULL); ALTER TABLE "pokemon_v2_berryflavor" ADD COLUMN "contest_type_id" integer NULL; ALTER TABLE "pokemon_v2_berryflavor" ALTER COLUMN "contest_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_berry" ADD COLUMN "berry_firmness_id" integer NULL; ALTER TABLE "pokemon_v2_berry" ALTER COLUMN "berry_firmness_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_berry" ADD COLUMN "item_id" integer NULL; ALTER TABLE "pokemon_v2_berry" ALTER COLUMN "item_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" RENAME COLUMN "hates_flavor_id" TO "hates_flavor"; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "hates_flavor" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" RENAME COLUMN "hates_flavor" TO "hates_flavor_id"; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "hates_flavor_id" DROP NOT NULL; CREATE INDEX pokemon_v2_nature_hates_flavor_id_473225fd734a8883_uniq ON "pokemon_v2_nature" ("hates_flavor_id"); ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "hates_flavor_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" RENAME COLUMN "likes_flavor_id" TO "likes_flavor"; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "likes_flavor" DROP DEFAULT; ALTER TABLE "pokemon_v2_nature" RENAME COLUMN "likes_flavor" TO "likes_flavor_id"; ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "likes_flavor_id" DROP NOT NULL; CREATE INDEX pokemon_v2_nature_likes_flavor_id_501e27222f3005b4_uniq ON "pokemon_v2_nature" ("likes_flavor_id"); ALTER TABLE "pokemon_v2_nature" ALTER COLUMN "likes_flavor_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_region" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_regionname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "region_id" integer NULL); ALTER TABLE "pokemon_v2_generation" DROP COLUMN "main_region_id" CASCADE; ALTER TABLE "pokemon_v2_pokedex" DROP COLUMN "region_id" CASCADE; ALTER TABLE "pokemon_v2_generation" ADD COLUMN "region_id" integer NULL; ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "region_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokedex" ADD COLUMN "region_id" integer NULL; ALTER TABLE "pokemon_v2_pokedex" ALTER COLUMN "region_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroupregion" ADD COLUMN "region_id" integer NULL; ALTER TABLE "pokemon_v2_versiongroupregion" ALTER COLUMN "region_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_location" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "region_id" integer NULL); CREATE TABLE "pokemon_v2_locationarea" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "name" varchar(100) NOT NULL, "location_id" integer NULL); CREATE TABLE "pokemon_v2_locationareaencounterrate" ("id" serial NOT NULL PRIMARY KEY, "rate" integer NOT NULL, "location_area_id" integer NULL, "version_id" integer NULL); CREATE TABLE "pokemon_v2_locationareaname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "location_area_id" integer NULL); CREATE TABLE "pokemon_v2_locationgameindex" ("id" serial NOT NULL PRIMARY KEY, "game_index" integer NOT NULL, "generation_id" integer NULL, "location_id" integer NULL); CREATE TABLE "pokemon_v2_locationname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "location_id" integer NULL); CREATE TABLE "pokemon_v2_encounter" ("id" serial NOT NULL PRIMARY KEY, "min_level" integer NOT NULL, "max_level" integer NOT NULL, "location_area_id" integer NULL, "pokemon_id" integer NULL, "version_id" integer NULL); CREATE TABLE "pokemon_v2_encountercondition" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_encounterconditionname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "encounter_condition_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_encounterconditionvalue" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "is_default" boolean NOT NULL, "encounter_condition_id" integer NULL); CREATE TABLE "pokemon_v2_encounterconditionvaluemap" ("id" serial NOT NULL PRIMARY KEY, "encounter_id" integer NULL, "encounter_condition_value_id" integer NULL); CREATE TABLE "pokemon_v2_encounterconditionvaluename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "encounter_condition_value_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_encountermethod" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "order" integer NULL); CREATE TABLE "pokemon_v2_encountermethodname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "encounter_method_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_encounterslot" ("id" serial NOT NULL PRIMARY KEY, "slot" integer NULL, "rarity" integer NOT NULL, "encounter_method_id" integer NULL, "version_group_id" integer NULL); ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD COLUMN "encounter_method_id" integer NULL; ALTER TABLE "pokemon_v2_locationareaencounterrate" ALTER COLUMN "encounter_method_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_encounter" ADD COLUMN "encounter_slot_id" integer NULL; ALTER TABLE "pokemon_v2_encounter" ALTER COLUMN "encounter_slot_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_palpark" ("id" serial NOT NULL PRIMARY KEY, "base_score" integer NOT NULL, "rate" integer NOT NULL); CREATE TABLE "pokemon_v2_palparkarea" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_palparkareaname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "pal_park_area_id" integer NULL); CREATE TABLE "pokemon_v2_pokeathlonstat" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL); CREATE TABLE "pokemon_v2_pokeathlonstatname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "pokeathlon_stat_id" integer NULL); CREATE TABLE "pokemon_v2_supercontestcombo" ("id" serial NOT NULL PRIMARY KEY, "first_move_id" integer NULL, "second_move_id" integer NULL); CREATE TABLE "pokemon_v2_supercontesteffect" ("id" serial NOT NULL PRIMARY KEY, "appeal" integer NOT NULL); ALTER TABLE "pokemon_v2_palpark" ADD COLUMN "pal_park_area_id" integer NULL; ALTER TABLE "pokemon_v2_palpark" ALTER COLUMN "pal_park_area_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_palpark" ADD COLUMN "pokemon_species_id" integer NULL; ALTER TABLE "pokemon_v2_palpark" ALTER COLUMN "pokemon_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_naturepokeathlonstat" ADD COLUMN "pokeathlon_stat_id" integer NULL; ALTER TABLE "pokemon_v2_naturepokeathlonstat" ALTER COLUMN "pokeathlon_stat_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_palpark" ALTER COLUMN "base_score" DROP NOT NULL; ALTER TABLE "pokemon_v2_palpark" ALTER COLUMN "base_score" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" DROP CONSTRAINT "pokemon_v2_ability_id_3a552c9915472fd7_fk_pokemon_v2_ability_id"; ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon_v2_ability_id_3a552c9915472fd7_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "ability_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" DROP CONSTRAINT "pokemon_v2_ability_id_3a552c9915472fd7_fk_pokemon_v2_ability_id"; ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon_v2_ability_id_3a552c9915472fd7_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "ability_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" DROP CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id"; ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "language_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" DROP CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id"; ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "language_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_ability" DROP CONSTRAINT "poke_generation_id_58e0814a11a57407_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_ability" ADD CONSTRAINT "poke_generation_id_58e0814a11a57407_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_ability" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilityflavortext" DROP CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id"; ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_abilityflavortext" ALTER COLUMN "language_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_encounter" DROP CONSTRAINT "pokemon_v2_version_id_27a3b8f0898e90b9_fk_pokemon_v2_version_id"; ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "pokemon_v2_version_id_27a3b8f0898e90b9_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_encounter" ALTER COLUMN "version_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_generation" DROP CONSTRAINT "pokemon_v2_g_region_id_3f3d893d496d3e0e_fk_pokemon_v2_region_id"; ALTER TABLE "pokemon_v2_generation" ADD CONSTRAINT "pokemon_v2_g_region_id_3f3d893d496d3e0e_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "region_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_generationname" DROP CONSTRAINT "poke_generation_id_72d16f4b77c02801_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_generationname" ADD CONSTRAINT "poke_generation_id_72d16f4b77c02801_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_generationname" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_location" DROP CONSTRAINT "pokemon_v2_l_region_id_52ba86b8a6e45daf_fk_pokemon_v2_region_id"; ALTER TABLE "pokemon_v2_location" ADD CONSTRAINT "pokemon_v2_l_region_id_52ba86b8a6e45daf_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_location" ALTER COLUMN "region_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_locationareaencounterrate" DROP CONSTRAINT "pokemon_v2_version_id_40344f5409798237_fk_pokemon_v2_version_id"; ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD CONSTRAINT "pokemon_v2_version_id_40344f5409798237_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_locationareaencounterrate" ALTER COLUMN "version_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" DROP CONSTRAINT "poke_generation_id_1b6b2b44c75bf933_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "poke_generation_id_1b6b2b44c75bf933_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" DROP CONSTRAINT "pokemon_v2_move_type_id_103146a2efa7cecb_fk_pokemon_v2_type_id"; ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "pokemon_v2_move_type_id_103146a2efa7cecb_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonitem" DROP CONSTRAINT "pokemon_v2_version_id_1c4ff24795fa46b6_fk_pokemon_v2_version_id"; ALTER TABLE "pokemon_v2_pokemonitem" ADD CONSTRAINT "pokemon_v2_version_id_1c4ff24795fa46b6_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonitem" ALTER COLUMN "version_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "poke_generation_id_17b653102a584895_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "poke_generation_id_17b653102a584895_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" DROP CONSTRAINT "poke_generation_id_5a6fbd788d927560_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_type" ADD CONSTRAINT "poke_generation_id_5a6fbd788d927560_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_type" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_version" DROP CONSTRAINT "D3367d6ed1ba5cf392518fe8a83f0ac9"; ALTER TABLE "pokemon_v2_version" ADD CONSTRAINT "D3367d6ed1ba5cf392518fe8a83f0ac9" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_version" ALTER COLUMN "version_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroup" DROP CONSTRAINT "poke_generation_id_59848104ab8b1e9b_fk_pokemon_v2_generation_id"; ALTER TABLE "pokemon_v2_versiongroup" ADD CONSTRAINT "poke_generation_id_59848104ab8b1e9b_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_versiongroup" ALTER COLUMN "generation_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_versiongroupregion" DROP CONSTRAINT "b8e3be50645522bce17d49c1e94a5a8f"; ALTER TABLE "pokemon_v2_versiongroupregion" ADD CONSTRAINT "b8e3be50645522bce17d49c1e94a5a8f" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_versiongroupregion" ALTER COLUMN "version_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_typeefficacy" ADD COLUMN "damage_type_id" integer NULL; ALTER TABLE "pokemon_v2_typeefficacy" ALTER COLUMN "damage_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_typeefficacy" ADD COLUMN "target_type_id" integer NULL; ALTER TABLE "pokemon_v2_typeefficacy" ALTER COLUMN "target_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemon" DROP CONSTRAINT "D38bf46986f6fda7f6ec64be183ad130"; ALTER TABLE "pokemon_v2_pokemon" ADD CONSTRAINT "D38bf46986f6fda7f6ec64be183ad130" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemon" ALTER COLUMN "pokemon_species_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemondexnumber" DROP CONSTRAINT "pokemon_v2_pokedex_id_544d2a658b4006c0_fk_pokemon_v2_pokedex_id"; ALTER TABLE "pokemon_v2_pokemondexnumber" ADD CONSTRAINT "pokemon_v2_pokedex_id_544d2a658b4006c0_fk_pokemon_v2_pokedex_id" FOREIGN KEY ("pokedex_id") REFERENCES "pokemon_v2_pokedex" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemondexnumber" ALTER COLUMN "pokedex_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_encounter" DROP CONSTRAINT "e557d11419f42576e0a18e3e18c44bae"; ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "e557d11419f42576e0a18e3e18c44bae" FOREIGN KEY ("location_area_id") REFERENCES "pokemon_v2_locationarea" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_encounter" ALTER COLUMN "location_area_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_encounter" DROP CONSTRAINT "pokemon_v2_pokemon_id_3bae3e5349b8fb62_fk_pokemon_v2_pokemon_id"; ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "pokemon_v2_pokemon_id_3bae3e5349b8fb62_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_encounter" ALTER COLUMN "pokemon_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_encounterconditionvalue" DROP CONSTRAINT "D28801a9cc8cf5e39f87bb297104b19d"; ALTER TABLE "pokemon_v2_encounterconditionvalue" ADD CONSTRAINT "D28801a9cc8cf5e39f87bb297104b19d" FOREIGN KEY ("encounter_condition_id") REFERENCES "pokemon_v2_encountercondition" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_encounterconditionvalue" ALTER COLUMN "encounter_condition_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_locationarea" DROP CONSTRAINT "pokemon_v2_location_id_9ff3c5ffccd42d_fk_pokemon_v2_location_id"; ALTER TABLE "pokemon_v2_locationarea" ADD CONSTRAINT "pokemon_v2_location_id_9ff3c5ffccd42d_fk_pokemon_v2_location_id" FOREIGN KEY ("location_id") REFERENCES "pokemon_v2_location" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_locationarea" ALTER COLUMN "location_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_locationareaencounterrate" DROP CONSTRAINT "D2d7eb07b5d3064192ed57526abefbb2"; ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD CONSTRAINT "D2d7eb07b5d3064192ed57526abefbb2" FOREIGN KEY ("location_area_id") REFERENCES "pokemon_v2_locationarea" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_locationareaencounterrate" ALTER COLUMN "location_area_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_machine" DROP CONSTRAINT "pok_growth_rate_id_675b25cdc5357125_fk_pokemon_v2_growthrate_id"; ALTER TABLE "pokemon_v2_machine" ADD CONSTRAINT "pok_growth_rate_id_675b25cdc5357125_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_machine" ALTER COLUMN "growth_rate_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_movechange" DROP CONSTRAINT "pokemon_v2_movec_move_id_33534d653326a11a_fk_pokemon_v2_move_id"; ALTER TABLE "pokemon_v2_movechange" ADD CONSTRAINT "pokemon_v2_movec_move_id_33534d653326a11a_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_movechange" ALTER COLUMN "move_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonegggroup" DROP CONSTRAINT "pokemon_egg_group_id_3b3946877db86b3a_fk_pokemon_v2_egggroup_id"; ALTER TABLE "pokemon_v2_pokemonegggroup" ADD CONSTRAINT "pokemon_egg_group_id_3b3946877db86b3a_fk_pokemon_v2_egggroup_id" FOREIGN KEY ("egg_group_id") REFERENCES "pokemon_v2_egggroup" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonegggroup" ALTER COLUMN "egg_group_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" DROP CONSTRAINT "D4655be51673427e9050739651271a26"; ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "D4655be51673427e9050739651271a26" FOREIGN KEY ("evolution_trigger_id") REFERENCES "pokemon_v2_evolutiontrigger" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "evolution_trigger_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonform" DROP CONSTRAINT "pokemon_v2__pokemon_id_3288937deb75b1e_fk_pokemon_v2_pokemon_id"; ALTER TABLE "pokemon_v2_pokemonform" ADD CONSTRAINT "pokemon_v2__pokemon_id_3288937deb75b1e_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "pokemon_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonitem" DROP CONSTRAINT "pokemon_v2_pokemon_id_351276dd4e9fda25_fk_pokemon_v2_pokemon_id"; ALTER TABLE "pokemon_v2_pokemonitem" ADD CONSTRAINT "pokemon_v2_pokemon_id_351276dd4e9fda25_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonitem" ALTER COLUMN "pokemon_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "pok_growth_rate_id_5b7547efc0d0803c_fk_pokemon_v2_growthrate_id"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "pok_growth_rate_id_5b7547efc0d0803c_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "growth_rate_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonform" RENAME COLUMN "form_identifier" TO "form_name"; ALTER TABLE "pokemon_v2_pokemonform" ALTER COLUMN "form_name" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonmove" ADD COLUMN "move_learn_method_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonmove" ALTER COLUMN "move_learn_method_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_versiongroupmovelearnmethod" ("id" serial NOT NULL PRIMARY KEY, "move_learn_method_id" integer NULL, "version_group_id" integer NULL); CREATE TABLE "pokemon_v2_itemattributedescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "item_attribute_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_itemattributemap" ("id" serial NOT NULL PRIMARY KEY, "item_id" integer NULL, "item_attribute_id" integer NULL); ALTER TABLE "pokemon_v2_berry" ADD COLUMN "name" varchar(100) DEFAULT 'name' NOT NULL; ALTER TABLE "pokemon_v2_berry" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_languagename" ADD COLUMN "local_language_id" integer NULL; ALTER TABLE "pokemon_v2_languagename" ALTER COLUMN "local_language_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_naturepokeathlonstat" DROP CONSTRAINT "pokemon_v2_n_nature_id_47daa6895dd86cad_fk_pokemon_v2_nature_id"; ALTER TABLE "pokemon_v2_naturepokeathlonstat" ADD CONSTRAINT "pokemon_v2_n_nature_id_47daa6895dd86cad_fk_pokemon_v2_nature_id" FOREIGN KEY ("nature_id") REFERENCES "pokemon_v2_nature" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_naturepokeathlonstat" ALTER COLUMN "nature_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_itemattributename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "item_attribute_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_moveattributedescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "move_attribute_id" integer NULL); CREATE TABLE "pokemon_v2_moveattributemap" ("id" serial NOT NULL PRIMARY KEY, "move_id" integer NULL, "move_attribute_id" integer NULL); CREATE TABLE "pokemon_v2_moveattributename" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_attribute_id" integer NULL); CREATE TABLE "pokemon_v2_movedamageclassname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_damage_class_id" integer NULL); CREATE TABLE "pokemon_v2_movetargetname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "move_target_id" integer NULL); CREATE TABLE "pokemon_v2_pokedexname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "language_id" integer NULL, "pokedex_id" integer NULL); CREATE TABLE "pokemon_v2_movelearnmethoddescription" ("id" serial NOT NULL PRIMARY KEY, "description" varchar(1000) NOT NULL, "language_id" integer NULL, "move_learn_method_id" integer NULL); ALTER TABLE "pokemon_v2_move" DROP CONSTRAINT "ff2fa2361dd26464d25a9d2889488ad9"; ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "ff2fa2361dd26464d25a9d2889488ad9" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_stat" DROP CONSTRAINT "e1c95e5d1671dbb1335d86d79fcc0639"; ALTER TABLE "pokemon_v2_stat" ADD CONSTRAINT "e1c95e5d1671dbb1335d86d79fcc0639" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_stat" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_type" DROP CONSTRAINT "D41bbf32b56adbc898b261474d82a31d"; ALTER TABLE "pokemon_v2_type" ADD CONSTRAINT "D41bbf32b56adbc898b261474d82a31d" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_type" ALTER COLUMN "move_damage_class_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" DROP CONSTRAINT "pok_move_target_id_5e526307ed6bfeff_fk_pokemon_v2_movetarget_id"; ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "pok_move_target_id_5e526307ed6bfeff_fk_pokemon_v2_movetarget_id" FOREIGN KEY ("move_target_id") REFERENCES "pokemon_v2_movetarget" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "move_target_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_abilitychangeeffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "ability_change_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_abilityeffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "short_effect" varchar(300) NOT NULL, "ability_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_itemeffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "short_effect" varchar(300) NOT NULL, "item_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_contesteffecteffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "contest_effect_id" integer NULL, "language_id" integer NULL); CREATE TABLE "pokemon_v2_moveeffectchangeeffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "language_id" integer NULL, "move_effect_change_id" integer NULL); CREATE TABLE "pokemon_v2_moveeffecteffecttext" ("id" serial NOT NULL PRIMARY KEY, "effect" varchar(4000) NOT NULL, "short_effect" varchar(300) NOT NULL, "language_id" integer NULL, "move_effect_id" integer NULL); CREATE TABLE "pokemon_v2_supercontesteffectflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(500) NOT NULL, "language_id" integer NULL, "super_contest_effect_id" integer NULL); CREATE TABLE "pokemon_v2_contesteffectflavortext" ("id" serial NOT NULL PRIMARY KEY, "flavor_text" varchar(500) NOT NULL, "contest_effect_id" integer NULL, "language_id" integer NULL); ALTER TABLE "pokemon_v2_characteristic" DROP CONSTRAINT "pokemon_v2_charac_stat_id_77b3066c6edac8b_fk_pokemon_v2_stat_id"; ALTER TABLE "pokemon_v2_characteristic" ADD CONSTRAINT "pokemon_v2_charac_stat_id_77b3066c6edac8b_fk_pokemon_v2_stat_id" FOREIGN KEY ("stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_characteristic" ALTER COLUMN "stat_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "da34ea3f0f7376c114f4f3e3fb7d24c7"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "da34ea3f0f7376c114f4f3e3fb7d24c7" FOREIGN KEY ("pokemon_color_id") REFERENCES "pokemon_v2_pokemoncolor" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "pokemon_color_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "D9144c396878862b91543fee5fa0ec1d"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D9144c396878862b91543fee5fa0ec1d" FOREIGN KEY ("pokemon_shape_id") REFERENCES "pokemon_v2_pokemonshape" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "pokemon_shape_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonevolution" ADD COLUMN "location_id" integer NULL; ALTER TABLE "pokemon_v2_pokemonevolution" ALTER COLUMN "location_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "D9144c396878862b91543fee5fa0ec1d"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D9144c396878862b91543fee5fa0ec1d" FOREIGN KEY ("pokemon_shape_id") REFERENCES "pokemon_v2_pokemonshape" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "pokemon_shape_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_naturebattlestylepreference" ADD COLUMN "move_battle_style_id" integer NULL; ALTER TABLE "pokemon_v2_naturebattlestylepreference" ALTER COLUMN "move_battle_style_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_abilitychange" ADD COLUMN "version_group_id" integer NULL; ALTER TABLE "pokemon_v2_abilitychange" ALTER COLUMN "version_group_id" DROP DEFAULT; CREATE TABLE "pokemon_v2_berryflavorname" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "berry_flavor_id" integer NULL, "language_id" integer NULL); ALTER TABLE "pokemon_v2_berryflavor" DROP COLUMN "flavor" CASCADE; ALTER TABLE "pokemon_v2_berryflavor" ADD COLUMN "name" varchar(100) DEFAULT 'name' NOT NULL; ALTER TABLE "pokemon_v2_berryflavor" ALTER COLUMN "name" DROP DEFAULT; CREATE TABLE "pokemon_v2_berryflavormap" ("id" serial NOT NULL PRIMARY KEY, "potency" integer NOT NULL, "berry_id" integer NULL, "berry_flavor_id" integer NULL); CREATE TABLE "pokemon_v2_itemflingeffecteffecttext" ("id" serial NOT NULL PRIMARY KEY, "item_fling_effect_id" integer NULL, "language_id" integer NULL, "effect" varchar(4000) NOT NULL); ALTER TABLE "pokemon_v2_berry" DROP CONSTRAINT "b9662e3b63788fce5a8a6a4711bc7456"; ALTER TABLE "pokemon_v2_berry" ADD CONSTRAINT "b9662e3b63788fce5a8a6a4711bc7456" FOREIGN KEY ("berry_firmness_id") REFERENCES "pokemon_v2_berryfirmness" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_berry" ALTER COLUMN "berry_firmness_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_berryflavor" DROP CONSTRAINT "p_contest_type_id_4261b26f3f6e75e4_fk_pokemon_v2_contesttype_id"; ALTER TABLE "pokemon_v2_berryflavor" ADD CONSTRAINT "pokemon_v2_berryflavor_contest_type_id_4261b26f3f6e75e4_uniq" UNIQUE ("contest_type_id"); ALTER TABLE "pokemon_v2_berryflavor" ADD CONSTRAINT "p_contest_type_id_4261b26f3f6e75e4_fk_pokemon_v2_contesttype_id" FOREIGN KEY ("contest_type_id") REFERENCES "pokemon_v2_contesttype" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_berryflavor" ALTER COLUMN "contest_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" DROP COLUMN "contest_effect_id" CASCADE; ALTER TABLE "pokemon_v2_move" DROP COLUMN "contest_type_id" CASCADE; ALTER TABLE "pokemon_v2_move" DROP COLUMN "super_contest_effect_id" CASCADE; ALTER TABLE "pokemon_v2_move" ADD COLUMN "contest_effect_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "contest_type_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "contest_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_move" ADD COLUMN "super_contest_effect_id" integer NULL; ALTER TABLE "pokemon_v2_move" ALTER COLUMN "super_contest_effect_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "b06b2a0466614da2bacaa706b8bb9235"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "b06b2a0466614da2bacaa706b8bb9235" FOREIGN KEY ("pokemon_habitat_id") REFERENCES "pokemon_v2_pokemonhabitat" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "pokemon_habitat_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_pokemonspecies" DROP CONSTRAINT "D9144c396878862b91543fee5fa0ec1d"; ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D9144c396878862b91543fee5fa0ec1d" FOREIGN KEY ("pokemon_shape_id") REFERENCES "pokemon_v2_pokemonshape" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_pokemonspecies" ALTER COLUMN "pokemon_shape_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_generation" DROP CONSTRAINT "pokemon_v2_g_region_id_3f3d893d496d3e0e_fk_pokemon_v2_region_id"; ALTER TABLE "pokemon_v2_generation" ADD CONSTRAINT "pokemon_v2_generation_region_id_3f3d893d496d3e0e_uniq" UNIQUE ("region_id"); ALTER TABLE "pokemon_v2_generation" ADD CONSTRAINT "pokemon_v2_g_region_id_3f3d893d496d3e0e_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_generation" ALTER COLUMN "region_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_berry" ADD COLUMN "natural_gift_type_id" integer NULL; ALTER TABLE "pokemon_v2_berry" ALTER COLUMN "natural_gift_type_id" DROP DEFAULT; ALTER TABLE "pokemon_v2_itemflingeffect" ALTER COLUMN "name" DROP DEFAULT; ALTER TABLE "pokemon_v2_itemflingeffect" ALTER COLUMN "name" DROP DEFAULT; CREATE TABLE "pokemon_v2_pokemonsprites" ("id" serial NOT NULL PRIMARY KEY, "sprites" varchar(500) NOT NULL, "pokemon_id" integer NULL); CREATE TABLE "pokemon_v2_itemsprites" ("id" serial NOT NULL PRIMARY KEY, "sprites" varchar(500) NOT NULL, "item_id" integer NULL); CREATE TABLE "pokemon_v2_pokemonformsprites" ("id" serial NOT NULL PRIMARY KEY, "sprites" varchar(500) NOT NULL, "pokemon_form_id" integer NULL); CREATE INDEX pokemon_v2_languagename_468679bd ON "pokemon_v2_languagename" ("language_id"); ALTER TABLE "pokemon_v2_languagename" ADD CONSTRAINT "pokemon__language_id_1e24352a0196d929_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_generationname_52c01041 ON "pokemon_v2_generationname" ("generation_id"); ALTER TABLE "pokemon_v2_generationname" ADD CONSTRAINT "poke_generation_id_72d16f4b77c02801_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_ability_52c01041 ON "pokemon_v2_ability" ("generation_id"); ALTER TABLE "pokemon_v2_ability" ADD CONSTRAINT "poke_generation_id_58e0814a11a57407_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityflavortext_ca1a862d ON "pokemon_v2_abilityflavortext" ("ability_id"); ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon_v2_ability_id_3a552c9915472fd7_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityflavortext_468679bd ON "pokemon_v2_abilityflavortext" ("language_id"); ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "pokemon__language_id_68b79c22941b1620_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityname_ca1a862d ON "pokemon_v2_abilityname" ("ability_id"); ALTER TABLE "pokemon_v2_abilityname" ADD CONSTRAINT "pokemon_v2_ability_id_77bff2e99364897b_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityname_468679bd ON "pokemon_v2_abilityname" ("language_id"); ALTER TABLE "pokemon_v2_abilityname" ADD CONSTRAINT "pokemon__language_id_772d5b3003750f76_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versiongroup_52c01041 ON "pokemon_v2_versiongroup" ("generation_id"); ALTER TABLE "pokemon_v2_versiongroup" ADD CONSTRAINT "poke_generation_id_59848104ab8b1e9b_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versiongroupregion_e8509701 ON "pokemon_v2_versiongroupregion" ("version_group_id"); ALTER TABLE "pokemon_v2_versiongroupregion" ADD CONSTRAINT "b8e3be50645522bce17d49c1e94a5a8f" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versionname_468679bd ON "pokemon_v2_versionname" ("language_id"); ALTER TABLE "pokemon_v2_versionname" ADD CONSTRAINT "pokemon__language_id_4372485b7e5d700c_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versionname_316e8552 ON "pokemon_v2_versionname" ("version_id"); ALTER TABLE "pokemon_v2_versionname" ADD CONSTRAINT "pokemon_v2_version_id_23e2fc0241b91877_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_version_e8509701 ON "pokemon_v2_version" ("version_group_id"); ALTER TABLE "pokemon_v2_version" ADD CONSTRAINT "D3367d6ed1ba5cf392518fe8a83f0ac9" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityflavortext_e8509701 ON "pokemon_v2_abilityflavortext" ("version_group_id"); ALTER TABLE "pokemon_v2_abilityflavortext" ADD CONSTRAINT "D80d849e3c1709b05e428800b6cc3e7e" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_generationname_468679bd ON "pokemon_v2_generationname" ("language_id"); ALTER TABLE "pokemon_v2_generationname" ADD CONSTRAINT "pokemon__language_id_1f0700369f6f4dd9_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_type_52c01041 ON "pokemon_v2_type" ("generation_id"); ALTER TABLE "pokemon_v2_type" ADD CONSTRAINT "poke_generation_id_5a6fbd788d927560_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typegameindex_52c01041 ON "pokemon_v2_typegameindex" ("generation_id"); ALTER TABLE "pokemon_v2_typegameindex" ADD CONSTRAINT "poke_generation_id_72e217b1326dd461_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typegameindex_94757cae ON "pokemon_v2_typegameindex" ("type_id"); ALTER TABLE "pokemon_v2_typegameindex" ADD CONSTRAINT "pokemon_v2_typeg_type_id_1a655c44d2f7bf07_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typename_468679bd ON "pokemon_v2_typename" ("language_id"); ALTER TABLE "pokemon_v2_typename" ADD CONSTRAINT "pokemon__language_id_1fddfed9869465d5_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typename_94757cae ON "pokemon_v2_typename" ("type_id"); ALTER TABLE "pokemon_v2_typename" ADD CONSTRAINT "pokemon_v2_typen_type_id_50b98369743b102d_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturebattlestylepreference_5c0ad424 ON "pokemon_v2_naturebattlestylepreference" ("nature_id"); ALTER TABLE "pokemon_v2_naturebattlestylepreference" ADD CONSTRAINT "pokemon_v2_n_nature_id_77e8bdd82ae869d1_fk_pokemon_v2_nature_id" FOREIGN KEY ("nature_id") REFERENCES "pokemon_v2_nature" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_statname_468679bd ON "pokemon_v2_statname" ("language_id"); ALTER TABLE "pokemon_v2_statname" ADD CONSTRAINT "pokemon__language_id_43025d8e1fbc2caf_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_statname_3a45c83f ON "pokemon_v2_statname" ("stat_id"); ALTER TABLE "pokemon_v2_statname" ADD CONSTRAINT "pokemon_v2_statn_stat_id_4c801c87946a5bbd_fk_pokemon_v2_stat_id" FOREIGN KEY ("stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_nature_7e331914 ON "pokemon_v2_nature" ("decreased_stat_id"); ALTER TABLE "pokemon_v2_nature" ADD CONSTRAINT "pokemo_decreased_stat_id_358465f06bf194c8_fk_pokemon_v2_stat_id" FOREIGN KEY ("decreased_stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_nature_34e83a44 ON "pokemon_v2_nature" ("increased_stat_id"); ALTER TABLE "pokemon_v2_nature" ADD CONSTRAINT "pokemon_increased_stat_id_423d306657b6ffc_fk_pokemon_v2_stat_id" FOREIGN KEY ("increased_stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturename_468679bd ON "pokemon_v2_naturename" ("language_id"); ALTER TABLE "pokemon_v2_naturename" ADD CONSTRAINT "pokemon__language_id_7987daf51420fab4_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturename_5c0ad424 ON "pokemon_v2_naturename" ("nature_id"); ALTER TABLE "pokemon_v2_naturename" ADD CONSTRAINT "pokemon_v2_n_nature_id_5005c39213bd6edb_fk_pokemon_v2_nature_id" FOREIGN KEY ("nature_id") REFERENCES "pokemon_v2_nature" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturepokeathlonstat_5c0ad424 ON "pokemon_v2_naturepokeathlonstat" ("nature_id"); ALTER TABLE "pokemon_v2_naturepokeathlonstat" ADD CONSTRAINT "pokemon_v2_n_nature_id_47daa6895dd86cad_fk_pokemon_v2_nature_id" FOREIGN KEY ("nature_id") REFERENCES "pokemon_v2_nature" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_characteristic_3a45c83f ON "pokemon_v2_characteristic" ("stat_id"); ALTER TABLE "pokemon_v2_characteristic" ADD CONSTRAINT "pokemon_v2_charac_stat_id_77b3066c6edac8b_fk_pokemon_v2_stat_id" FOREIGN KEY ("stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_characteristicdescription_6697027e ON "pokemon_v2_characteristicdescription" ("characteristic_id"); ALTER TABLE "pokemon_v2_characteristicdescription" ADD CONSTRAINT "D4694d1ee9e1ad17c5b032c714bd71f8" FOREIGN KEY ("characteristic_id") REFERENCES "pokemon_v2_characteristic" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_characteristicdescription_468679bd ON "pokemon_v2_characteristicdescription" ("language_id"); ALTER TABLE "pokemon_v2_characteristicdescription" ADD CONSTRAINT "pokemon__language_id_1a14836df665ef78_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_egggroupname_8b645cc9 ON "pokemon_v2_egggroupname" ("egg_group_id"); ALTER TABLE "pokemon_v2_egggroupname" ADD CONSTRAINT "pokemon__egg_group_id_a0145fafa83f423_fk_pokemon_v2_egggroup_id" FOREIGN KEY ("egg_group_id") REFERENCES "pokemon_v2_egggroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_egggroupname_468679bd ON "pokemon_v2_egggroupname" ("language_id"); ALTER TABLE "pokemon_v2_egggroupname" ADD CONSTRAINT "pokemon__language_id_19df281d3ead5047_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_growthratedescription_0d87fc3d ON "pokemon_v2_growthratedescription" ("growth_rate_id"); ALTER TABLE "pokemon_v2_growthratedescription" ADD CONSTRAINT "pok_growth_rate_id_1f31f2f0a4d45f7f_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_growthratedescription_468679bd ON "pokemon_v2_growthratedescription" ("language_id"); ALTER TABLE "pokemon_v2_growthratedescription" ADD CONSTRAINT "pokemon__language_id_71cfb073abda2100_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_52c01041 ON "pokemon_v2_move" ("generation_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "poke_generation_id_1b6b2b44c75bf933_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movebattlestylename_468679bd ON "pokemon_v2_movebattlestylename" ("language_id"); ALTER TABLE "pokemon_v2_movebattlestylename" ADD CONSTRAINT "pokemon__language_id_44681c23a826fe9c_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movebattlestylename_68cebe94 ON "pokemon_v2_movebattlestylename" ("move_battle_style_id"); ALTER TABLE "pokemon_v2_movebattlestylename" ADD CONSTRAINT "D38554e5ea7c8d437d90da554ecc9295" FOREIGN KEY ("move_battle_style_id") REFERENCES "pokemon_v2_movebattlestyle" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movechange_2a315a20 ON "pokemon_v2_movechange" ("move_id"); ALTER TABLE "pokemon_v2_movechange" ADD CONSTRAINT "pokemon_v2_movec_move_id_33534d653326a11a_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movedamageclassdescription_468679bd ON "pokemon_v2_movedamageclassdescription" ("language_id"); ALTER TABLE "pokemon_v2_movedamageclassdescription" ADD CONSTRAINT "pokemon__language_id_432458af495aabfe_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movedamageclassdescription_15214d2a ON "pokemon_v2_movedamageclassdescription" ("move_damage_class_id"); ALTER TABLE "pokemon_v2_movedamageclassdescription" ADD CONSTRAINT "D54a1c1882b1a889aff0d726fb342b20" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffectchange_f1ea6a35 ON "pokemon_v2_moveeffectchange" ("move_effect_id"); ALTER TABLE "pokemon_v2_moveeffectchange" ADD CONSTRAINT "pok_move_effect_id_500aabf4ecaf94de_fk_pokemon_v2_moveeffect_id" FOREIGN KEY ("move_effect_id") REFERENCES "pokemon_v2_moveeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffectchange_e8509701 ON "pokemon_v2_moveeffectchange" ("version_group_id"); ALTER TABLE "pokemon_v2_moveeffectchange" ADD CONSTRAINT "d85fa3e367808e4cfe7d6035e01e209d" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveflavortext_468679bd ON "pokemon_v2_moveflavortext" ("language_id"); ALTER TABLE "pokemon_v2_moveflavortext" ADD CONSTRAINT "pokemon__language_id_5feac26850ba985a_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveflavortext_2a315a20 ON "pokemon_v2_moveflavortext" ("move_id"); ALTER TABLE "pokemon_v2_moveflavortext" ADD CONSTRAINT "pokemon_v2_movef_move_id_4bee30c0033ebcf3_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveflavortext_e8509701 ON "pokemon_v2_moveflavortext" ("version_group_id"); ALTER TABLE "pokemon_v2_moveflavortext" ADD CONSTRAINT "D170550eeb9bd2af767cb1031aecaef9" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetaailmentname_468679bd ON "pokemon_v2_movemetaailmentname" ("language_id"); ALTER TABLE "pokemon_v2_movemetaailmentname" ADD CONSTRAINT "pokemon__language_id_7ec962690220f44e_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetaailmentname_70251b34 ON "pokemon_v2_movemetaailmentname" ("move_meta_ailment_id"); ALTER TABLE "pokemon_v2_movemetaailmentname" ADD CONSTRAINT "D32446726b5188ef9924e0e25a286b30" FOREIGN KEY ("move_meta_ailment_id") REFERENCES "pokemon_v2_movemetaailment" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetacategorydescription_468679bd ON "pokemon_v2_movemetacategorydescription" ("language_id"); ALTER TABLE "pokemon_v2_movemetacategorydescription" ADD CONSTRAINT "pokemon__language_id_65f28aeab19280fd_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetacategorydescription_f738ffbe ON "pokemon_v2_movemetacategorydescription" ("move_meta_category_id"); ALTER TABLE "pokemon_v2_movemetacategorydescription" ADD CONSTRAINT "D70d7506aeffccbde61ba189af48e9f9" FOREIGN KEY ("move_meta_category_id") REFERENCES "pokemon_v2_movemetacategory" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetastatchange_2a315a20 ON "pokemon_v2_movemetastatchange" ("move_id"); ALTER TABLE "pokemon_v2_movemetastatchange" ADD CONSTRAINT "pokemon_v2_moveme_move_id_24d4514aaf3e909_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemetastatchange_3a45c83f ON "pokemon_v2_movemetastatchange" ("stat_id"); ALTER TABLE "pokemon_v2_movemetastatchange" ADD CONSTRAINT "pokemon_v2_movem_stat_id_332b2012b9f408aa_fk_pokemon_v2_stat_id" FOREIGN KEY ("stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movename_468679bd ON "pokemon_v2_movename" ("language_id"); ALTER TABLE "pokemon_v2_movename" ADD CONSTRAINT "pokemon__language_id_66e47730047de258_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movename_2a315a20 ON "pokemon_v2_movename" ("move_id"); ALTER TABLE "pokemon_v2_movename" ADD CONSTRAINT "pokemon_v2_movena_move_id_b8ff52e26d94a2b_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movetargetdescription_468679bd ON "pokemon_v2_movetargetdescription" ("language_id"); ALTER TABLE "pokemon_v2_movetargetdescription" ADD CONSTRAINT "pokemon__language_id_11df7e76b3732659_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movetargetdescription_2646ccd3 ON "pokemon_v2_movetargetdescription" ("move_target_id"); ALTER TABLE "pokemon_v2_movetargetdescription" ADD CONSTRAINT "poke_move_target_id_5f5e3d466214265_fk_pokemon_v2_movetarget_id" FOREIGN KEY ("move_target_id") REFERENCES "pokemon_v2_movetarget" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemeta_f738ffbe ON "pokemon_v2_movemeta" ("move_meta_category_id"); ALTER TABLE "pokemon_v2_movemeta" ADD CONSTRAINT "af067199230360d6e86edca8d2f4bea0" FOREIGN KEY ("move_meta_category_id") REFERENCES "pokemon_v2_movemetacategory" ("id") DEFERRABLE INITIALLY DEFERRED; ALTER TABLE "pokemon_v2_movemeta" ADD CONSTRAINT "pokemon_v2_movem_move_id_40988a132ac649e5_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movemeta_70251b34 ON "pokemon_v2_movemeta" ("move_meta_ailment_id"); ALTER TABLE "pokemon_v2_movemeta" ADD CONSTRAINT "D033939c85657ea46cf475c9bd5a7241" FOREIGN KEY ("move_meta_ailment_id") REFERENCES "pokemon_v2_movemetaailment" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movechange_f1ea6a35 ON "pokemon_v2_movechange" ("move_effect_id"); ALTER TABLE "pokemon_v2_movechange" ADD CONSTRAINT "pok_move_effect_id_42927ea39aea36c7_fk_pokemon_v2_moveeffect_id" FOREIGN KEY ("move_effect_id") REFERENCES "pokemon_v2_moveeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movechange_94757cae ON "pokemon_v2_movechange" ("type_id"); ALTER TABLE "pokemon_v2_movechange" ADD CONSTRAINT "pokemon_v2_movec_type_id_41636ce505a6003f_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movechange_e8509701 ON "pokemon_v2_movechange" ("version_group_id"); ALTER TABLE "pokemon_v2_movechange" ADD CONSTRAINT "ef0610ddadcdf2fd9578d6532e7e3e82" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_15214d2a ON "pokemon_v2_move" ("move_damage_class_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "ff2fa2361dd26464d25a9d2889488ad9" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_f1ea6a35 ON "pokemon_v2_move" ("move_effect_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "poke_move_effect_id_fc0fc867f4597c5_fk_pokemon_v2_moveeffect_id" FOREIGN KEY ("move_effect_id") REFERENCES "pokemon_v2_moveeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_2646ccd3 ON "pokemon_v2_move" ("move_target_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "pok_move_target_id_5e526307ed6bfeff_fk_pokemon_v2_movetarget_id" FOREIGN KEY ("move_target_id") REFERENCES "pokemon_v2_movetarget" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_94757cae ON "pokemon_v2_move" ("type_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "pokemon_v2_move_type_id_103146a2efa7cecb_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_stat_15214d2a ON "pokemon_v2_stat" ("move_damage_class_id"); ALTER TABLE "pokemon_v2_stat" ADD CONSTRAINT "e1c95e5d1671dbb1335d86d79fcc0639" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_type_15214d2a ON "pokemon_v2_type" ("move_damage_class_id"); ALTER TABLE "pokemon_v2_type" ADD CONSTRAINT "D41bbf32b56adbc898b261474d82a31d" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilitychange_ca1a862d ON "pokemon_v2_abilitychange" ("ability_id"); ALTER TABLE "pokemon_v2_abilitychange" ADD CONSTRAINT "pokemon_v2_ability_id_1f664cac567b22f6_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_evolutiontriggername_a6e65f7a ON "pokemon_v2_evolutiontriggername" ("evolution_trigger_id"); ALTER TABLE "pokemon_v2_evolutiontriggername" ADD CONSTRAINT "e428ef20c582f1380dc56be2ae70f6c2" FOREIGN KEY ("evolution_trigger_id") REFERENCES "pokemon_v2_evolutiontrigger" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_evolutiontriggername_468679bd ON "pokemon_v2_evolutiontriggername" ("language_id"); ALTER TABLE "pokemon_v2_evolutiontriggername" ADD CONSTRAINT "pokemon__language_id_6830220b69c6bcbe_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_experience_0d87fc3d ON "pokemon_v2_experience" ("growth_rate_id"); ALTER TABLE "pokemon_v2_experience" ADD CONSTRAINT "pok_growth_rate_id_7786a7b09be21ae3_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexdescription_468679bd ON "pokemon_v2_pokedexdescription" ("language_id"); ALTER TABLE "pokemon_v2_pokedexdescription" ADD CONSTRAINT "pokemon_v_language_id_6bc6d5a2526b194_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexdescription_066873eb ON "pokemon_v2_pokedexdescription" ("pokedex_id"); ALTER TABLE "pokemon_v2_pokedexdescription" ADD CONSTRAINT "pokemon_v2_pokedex_id_31b25a96f46d14bb_fk_pokemon_v2_pokedex_id" FOREIGN KEY ("pokedex_id") REFERENCES "pokemon_v2_pokedex" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexversiongroup_066873eb ON "pokemon_v2_pokedexversiongroup" ("pokedex_id"); ALTER TABLE "pokemon_v2_pokedexversiongroup" ADD CONSTRAINT "pokemon_v2_pokedex_id_33a84052f1e35fb7_fk_pokemon_v2_pokedex_id" FOREIGN KEY ("pokedex_id") REFERENCES "pokemon_v2_pokedex" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexversiongroup_e8509701 ON "pokemon_v2_pokedexversiongroup" ("version_group_id"); ALTER TABLE "pokemon_v2_pokedexversiongroup" ADD CONSTRAINT "version_group_id_9c0a45cff0da1c1_fk_pokemon_v2_versiongroup_id" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonability_ca1a862d ON "pokemon_v2_pokemonability" ("ability_id"); ALTER TABLE "pokemon_v2_pokemonability" ADD CONSTRAINT "pokemon_v2_ability_id_36bd85937e5eb39c_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonability_acf1160d ON "pokemon_v2_pokemonability" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonability" ADD CONSTRAINT "pokemon_v2_pokemon_id_351ebb86cccc6a45_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemoncolorname_468679bd ON "pokemon_v2_pokemoncolorname" ("language_id"); ALTER TABLE "pokemon_v2_pokemoncolorname" ADD CONSTRAINT "pokemon__language_id_703f7a2489e8553f_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemoncolorname_1f76b7d9 ON "pokemon_v2_pokemoncolorname" ("pokemon_color_id"); ALTER TABLE "pokemon_v2_pokemoncolorname" ADD CONSTRAINT "fdbf86d7647d0e0ae7d03120d9ed387b" FOREIGN KEY ("pokemon_color_id") REFERENCES "pokemon_v2_pokemoncolor" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemondexnumber_066873eb ON "pokemon_v2_pokemondexnumber" ("pokedex_id"); ALTER TABLE "pokemon_v2_pokemondexnumber" ADD CONSTRAINT "pokemon_v2_pokedex_id_544d2a658b4006c0_fk_pokemon_v2_pokedex_id" FOREIGN KEY ("pokedex_id") REFERENCES "pokemon_v2_pokedex" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonegggroup_8b645cc9 ON "pokemon_v2_pokemonegggroup" ("egg_group_id"); ALTER TABLE "pokemon_v2_pokemonegggroup" ADD CONSTRAINT "pokemon_egg_group_id_3b3946877db86b3a_fk_pokemon_v2_egggroup_id" FOREIGN KEY ("egg_group_id") REFERENCES "pokemon_v2_egggroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_a6e65f7a ON "pokemon_v2_pokemonevolution" ("evolution_trigger_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "D4655be51673427e9050739651271a26" FOREIGN KEY ("evolution_trigger_id") REFERENCES "pokemon_v2_evolutiontrigger" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonform_e8509701 ON "pokemon_v2_pokemonform" ("version_group_id"); ALTER TABLE "pokemon_v2_pokemonform" ADD CONSTRAINT "D1d7db0be623228ce7571fbe5770cdc6" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonform_acf1160d ON "pokemon_v2_pokemonform" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonform" ADD CONSTRAINT "pokemon_v2__pokemon_id_3288937deb75b1e_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonformgeneration_52c01041 ON "pokemon_v2_pokemonformgeneration" ("generation_id"); ALTER TABLE "pokemon_v2_pokemonformgeneration" ADD CONSTRAINT "poke_generation_id_3b08979cf7d6f336_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonformgeneration_277de582 ON "pokemon_v2_pokemonformgeneration" ("pokemon_form_id"); ALTER TABLE "pokemon_v2_pokemonformgeneration" ADD CONSTRAINT "po_pokemon_form_id_54fab023db7965e_fk_pokemon_v2_pokemonform_id" FOREIGN KEY ("pokemon_form_id") REFERENCES "pokemon_v2_pokemonform" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonformname_468679bd ON "pokemon_v2_pokemonformname" ("language_id"); ALTER TABLE "pokemon_v2_pokemonformname" ADD CONSTRAINT "pokemon__language_id_16b175e583a6999f_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonformname_277de582 ON "pokemon_v2_pokemonformname" ("pokemon_form_id"); ALTER TABLE "pokemon_v2_pokemonformname" ADD CONSTRAINT "p_pokemon_form_id_796d9a421171f533_fk_pokemon_v2_pokemonform_id" FOREIGN KEY ("pokemon_form_id") REFERENCES "pokemon_v2_pokemonform" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemongameindex_acf1160d ON "pokemon_v2_pokemongameindex" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemongameindex" ADD CONSTRAINT "pokemon_v2__pokemon_id_323e75b9d1f4dc3_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemongameindex_316e8552 ON "pokemon_v2_pokemongameindex" ("version_id"); ALTER TABLE "pokemon_v2_pokemongameindex" ADD CONSTRAINT "pokemon_v2_version_id_3ec2abbb427b9b68_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonhabitatname_468679bd ON "pokemon_v2_pokemonhabitatname" ("language_id"); ALTER TABLE "pokemon_v2_pokemonhabitatname" ADD CONSTRAINT "pokemon__language_id_34ce18224bbb28a1_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonhabitatname_989abe27 ON "pokemon_v2_pokemonhabitatname" ("pokemon_habitat_id"); ALTER TABLE "pokemon_v2_pokemonhabitatname" ADD CONSTRAINT "D4e820c429a31d8c1222ab2e5517c807" FOREIGN KEY ("pokemon_habitat_id") REFERENCES "pokemon_v2_pokemonhabitat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonitem_acf1160d ON "pokemon_v2_pokemonitem" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonitem" ADD CONSTRAINT "pokemon_v2_pokemon_id_351276dd4e9fda25_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonitem_316e8552 ON "pokemon_v2_pokemonitem" ("version_id"); ALTER TABLE "pokemon_v2_pokemonitem" ADD CONSTRAINT "pokemon_v2_version_id_1c4ff24795fa46b6_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonmove_2a315a20 ON "pokemon_v2_pokemonmove" ("move_id"); ALTER TABLE "pokemon_v2_pokemonmove" ADD CONSTRAINT "pokemon_v2_pokem_move_id_7bcf8f24295c3538_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonmove_acf1160d ON "pokemon_v2_pokemonmove" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonmove" ADD CONSTRAINT "pokemon_v2_pokemon_id_61705eafd1c4949d_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonmove_e8509701 ON "pokemon_v2_pokemonmove" ("version_group_id"); ALTER TABLE "pokemon_v2_pokemonmove" ADD CONSTRAINT "version_group_id_61cc75561984bca_fk_pokemon_v2_versiongroup_id" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movelearnmethodname_468679bd ON "pokemon_v2_movelearnmethodname" ("language_id"); ALTER TABLE "pokemon_v2_movelearnmethodname" ADD CONSTRAINT "pokemon__language_id_431139e3628189c4_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movelearnmethodname_ed28b15b ON "pokemon_v2_movelearnmethodname" ("move_learn_method_id"); ALTER TABLE "pokemon_v2_movelearnmethodname" ADD CONSTRAINT "D5df0b4962a7d79bd7526db3b525d636" FOREIGN KEY ("move_learn_method_id") REFERENCES "pokemon_v2_movelearnmethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonshapename_468679bd ON "pokemon_v2_pokemonshapename" ("language_id"); ALTER TABLE "pokemon_v2_pokemonshapename" ADD CONSTRAINT "pokemon__language_id_299d32dd410e99d5_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonshapename_4cd25986 ON "pokemon_v2_pokemonshapename" ("pokemon_shape_id"); ALTER TABLE "pokemon_v2_pokemonshapename" ADD CONSTRAINT "D5a252882b9405806223f7e327ef2e65" FOREIGN KEY ("pokemon_shape_id") REFERENCES "pokemon_v2_pokemonshape" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_de08e53a ON "pokemon_v2_pokemonspecies" ("evolution_chain_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D340f1fc03400e6aaa849efe94b95647" FOREIGN KEY ("evolution_chain_id") REFERENCES "pokemon_v2_evolutionchain" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_3ac2f895 ON "pokemon_v2_pokemonspecies" ("evolves_from_species_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D123e18c02ff3b4aa4164e2e51129dd5" FOREIGN KEY ("evolves_from_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_52c01041 ON "pokemon_v2_pokemonspecies" ("generation_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "poke_generation_id_17b653102a584895_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_0d87fc3d ON "pokemon_v2_pokemonspecies" ("growth_rate_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "pok_growth_rate_id_5b7547efc0d0803c_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_1f76b7d9 ON "pokemon_v2_pokemonspecies" ("pokemon_color_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "da34ea3f0f7376c114f4f3e3fb7d24c7" FOREIGN KEY ("pokemon_color_id") REFERENCES "pokemon_v2_pokemoncolor" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_989abe27 ON "pokemon_v2_pokemonspecies" ("pokemon_habitat_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "b06b2a0466614da2bacaa706b8bb9235" FOREIGN KEY ("pokemon_habitat_id") REFERENCES "pokemon_v2_pokemonhabitat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspecies_4cd25986 ON "pokemon_v2_pokemonspecies" ("pokemon_shape_id"); ALTER TABLE "pokemon_v2_pokemonspecies" ADD CONSTRAINT "D9144c396878862b91543fee5fa0ec1d" FOREIGN KEY ("pokemon_shape_id") REFERENCES "pokemon_v2_pokemonshape" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesdescription_468679bd ON "pokemon_v2_pokemonspeciesdescription" ("language_id"); ALTER TABLE "pokemon_v2_pokemonspeciesdescription" ADD CONSTRAINT "pokemon__language_id_3ad23a38dba63b4c_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesdescription_8906fd21 ON "pokemon_v2_pokemonspeciesdescription" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemonspeciesdescription" ADD CONSTRAINT "D1ea2ffdc0e2118b38e9ab96d18213da" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesflavortext_468679bd ON "pokemon_v2_pokemonspeciesflavortext" ("language_id"); ALTER TABLE "pokemon_v2_pokemonspeciesflavortext" ADD CONSTRAINT "pokemon__language_id_2663e5fb6164cfb8_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesflavortext_8906fd21 ON "pokemon_v2_pokemonspeciesflavortext" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemonspeciesflavortext" ADD CONSTRAINT "D508b264e9de855ca7cda0203721cd90" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesflavortext_316e8552 ON "pokemon_v2_pokemonspeciesflavortext" ("version_id"); ALTER TABLE "pokemon_v2_pokemonspeciesflavortext" ADD CONSTRAINT "pokemon_v2_version_id_442f8d0bc01c1ff5_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesname_468679bd ON "pokemon_v2_pokemonspeciesname" ("language_id"); ALTER TABLE "pokemon_v2_pokemonspeciesname" ADD CONSTRAINT "pokemon_v_language_id_6594afda0db058a_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonspeciesname_8906fd21 ON "pokemon_v2_pokemonspeciesname" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemonspeciesname" ADD CONSTRAINT "D531148677fc5aff3e5d5274ef592d84" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonstat_acf1160d ON "pokemon_v2_pokemonstat" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonstat" ADD CONSTRAINT "pokemon_v2_pokemon_id_6df42cd0f5072ce2_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonstat_3a45c83f ON "pokemon_v2_pokemonstat" ("stat_id"); ALTER TABLE "pokemon_v2_pokemonstat" ADD CONSTRAINT "pokemon_v2_pokemo_stat_id_fcf6076a07102e4_fk_pokemon_v2_stat_id" FOREIGN KEY ("stat_id") REFERENCES "pokemon_v2_stat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemontype_acf1160d ON "pokemon_v2_pokemontype" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemontype" ADD CONSTRAINT "pokemon_v2_pokemon_id_455d76206fa7acc0_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemontype_94757cae ON "pokemon_v2_pokemontype" ("type_id"); ALTER TABLE "pokemon_v2_pokemontype" ADD CONSTRAINT "pokemon_v2_pokem_type_id_3d36773ddb9b2c60_fk_pokemon_v2_type_id" FOREIGN KEY ("type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_c62fc89c ON "pokemon_v2_pokemonevolution" ("evolved_species_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "D5616148b02a33f4df53a006698678cd" FOREIGN KEY ("evolved_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_623af7fd ON "pokemon_v2_pokemonevolution" ("gender_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemon_v2_p_gender_id_487d172724502051_fk_pokemon_v2_gender_id" FOREIGN KEY ("gender_id") REFERENCES "pokemon_v2_gender" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_3cf1f701 ON "pokemon_v2_pokemonevolution" ("known_move_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemon_v2_known_move_id_2a8b856727f7f783_fk_pokemon_v2_move_id" FOREIGN KEY ("known_move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_c375ede5 ON "pokemon_v2_pokemonevolution" ("known_move_type_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokem_known_move_type_id_554f4dbc09652a49_fk_pokemon_v2_type_id" FOREIGN KEY ("known_move_type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_6ca5ed32 ON "pokemon_v2_pokemonevolution" ("party_species_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "d7c81fece0db4b908968a8dfc854b92f" FOREIGN KEY ("party_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_4edc179c ON "pokemon_v2_pokemonevolution" ("party_type_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemon_v2_party_type_id_324f0b92c7b836c7_fk_pokemon_v2_type_id" FOREIGN KEY ("party_type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_7a40218d ON "pokemon_v2_pokemonevolution" ("trade_species_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "b5d8d0c9f1cc97f7273dcb2950f9e2eb" FOREIGN KEY ("trade_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonegggroup_8906fd21 ON "pokemon_v2_pokemonegggroup" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemonegggroup" ADD CONSTRAINT "c2c163088649edbc8c762b9b0f1a65a1" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemondexnumber_8906fd21 ON "pokemon_v2_pokemondexnumber" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemondexnumber" ADD CONSTRAINT "cc06f3fc728595c5a0ea4cc2977c2573" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemon_8906fd21 ON "pokemon_v2_pokemon" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_pokemon" ADD CONSTRAINT "D38bf46986f6fda7f6ec64be183ad130" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_machine_0d87fc3d ON "pokemon_v2_machine" ("growth_rate_id"); ALTER TABLE "pokemon_v2_machine" ADD CONSTRAINT "pok_growth_rate_id_675b25cdc5357125_fk_pokemon_v2_growthrate_id" FOREIGN KEY ("growth_rate_id") REFERENCES "pokemon_v2_growthrate" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_machine_2a315a20 ON "pokemon_v2_machine" ("move_id"); ALTER TABLE "pokemon_v2_machine" ADD CONSTRAINT "pokemon_v2_machi_move_id_6e871b9ce47b3327_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_machine_e8509701 ON "pokemon_v2_machine" ("version_group_id"); ALTER TABLE "pokemon_v2_machine" ADD CONSTRAINT "b685e2804bfcf7ab6b0f0ed99d8a89c5" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemcategoryname_f6f006f0 ON "pokemon_v2_itemcategoryname" ("item_category_id"); ALTER TABLE "pokemon_v2_itemcategoryname" ADD CONSTRAINT "D743cb7aa6ada22c3029541e42d2ace2" FOREIGN KEY ("item_category_id") REFERENCES "pokemon_v2_itemcategory" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemcategoryname_468679bd ON "pokemon_v2_itemcategoryname" ("language_id"); ALTER TABLE "pokemon_v2_itemcategoryname" ADD CONSTRAINT "pokemon__language_id_4f93257e1c98678e_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemflavortext_82bfda79 ON "pokemon_v2_itemflavortext" ("item_id"); ALTER TABLE "pokemon_v2_itemflavortext" ADD CONSTRAINT "pokemon_v2_itemf_item_id_63b443009a711db3_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemflavortext_468679bd ON "pokemon_v2_itemflavortext" ("language_id"); ALTER TABLE "pokemon_v2_itemflavortext" ADD CONSTRAINT "pokemon__language_id_4acbfaf79b5d462c_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemflavortext_e8509701 ON "pokemon_v2_itemflavortext" ("version_group_id"); ALTER TABLE "pokemon_v2_itemflavortext" ADD CONSTRAINT "D8ee77bce69143606e00a44a2a2f8d43" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemgameindex_52c01041 ON "pokemon_v2_itemgameindex" ("generation_id"); ALTER TABLE "pokemon_v2_itemgameindex" ADD CONSTRAINT "poke_generation_id_64362708251a8470_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemgameindex_82bfda79 ON "pokemon_v2_itemgameindex" ("item_id"); ALTER TABLE "pokemon_v2_itemgameindex" ADD CONSTRAINT "pokemon_v2_itemg_item_id_7bc252692488ae91_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemname_82bfda79 ON "pokemon_v2_itemname" ("item_id"); ALTER TABLE "pokemon_v2_itemname" ADD CONSTRAINT "pokemon_v2_itemn_item_id_4448bdbdd8b51419_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemname_468679bd ON "pokemon_v2_itemname" ("language_id"); ALTER TABLE "pokemon_v2_itemname" ADD CONSTRAINT "pokemon__language_id_44190205bc403c12_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itempocketname_4cba3d10 ON "pokemon_v2_itempocketname" ("item_pocket_id"); ALTER TABLE "pokemon_v2_itempocketname" ADD CONSTRAINT "pok_item_pocket_id_253c1fe84f790f57_fk_pokemon_v2_itempocket_id" FOREIGN KEY ("item_pocket_id") REFERENCES "pokemon_v2_itempocket" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itempocketname_468679bd ON "pokemon_v2_itempocketname" ("language_id"); ALTER TABLE "pokemon_v2_itempocketname" ADD CONSTRAINT "pokemon__language_id_5215959b6a1967d6_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemcategory_4cba3d10 ON "pokemon_v2_itemcategory" ("item_pocket_id"); ALTER TABLE "pokemon_v2_itemcategory" ADD CONSTRAINT "pok_item_pocket_id_4995ce6e70e93fdc_fk_pokemon_v2_itempocket_id" FOREIGN KEY ("item_pocket_id") REFERENCES "pokemon_v2_itempocket" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_item_f6f006f0 ON "pokemon_v2_item" ("item_category_id"); ALTER TABLE "pokemon_v2_item" ADD CONSTRAINT "abd3d8160503386c5111498942fe4749" FOREIGN KEY ("item_category_id") REFERENCES "pokemon_v2_itemcategory" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_item_5cc6ac4e ON "pokemon_v2_item" ("item_fling_effect_id"); ALTER TABLE "pokemon_v2_item" ADD CONSTRAINT "D1f52554550be9929969ffdbada0f5c6" FOREIGN KEY ("item_fling_effect_id") REFERENCES "pokemon_v2_itemflingeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_evolutionchain_e1de244d ON "pokemon_v2_evolutionchain" ("baby_trigger_item_id"); ALTER TABLE "pokemon_v2_evolutionchain" ADD CONSTRAINT "poke_baby_trigger_item_id_367a7d975966788_fk_pokemon_v2_item_id" FOREIGN KEY ("baby_trigger_item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_machine_82bfda79 ON "pokemon_v2_machine" ("item_id"); ALTER TABLE "pokemon_v2_machine" ADD CONSTRAINT "pokemon_v2_machi_item_id_40b102a699e352ed_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_071e8ce5 ON "pokemon_v2_pokemonevolution" ("evolution_item_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemo_evolution_item_id_7449319216db5553_fk_pokemon_v2_item_id" FOREIGN KEY ("evolution_item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_ec13394b ON "pokemon_v2_pokemonevolution" ("held_item_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemon_v2__held_item_id_235053c744c097ba_fk_pokemon_v2_item_id" FOREIGN KEY ("held_item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonitem_82bfda79 ON "pokemon_v2_pokemonitem" ("item_id"); ALTER TABLE "pokemon_v2_pokemonitem" ADD CONSTRAINT "pokemon_v2_pokemo_item_id_abf1dadcca0d4b4_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryfirmnessname_cac15508 ON "pokemon_v2_berryfirmnessname" ("berry_firmness_id"); ALTER TABLE "pokemon_v2_berryfirmnessname" ADD CONSTRAINT "D2ea41c2d1830570745f20a8c036308e" FOREIGN KEY ("berry_firmness_id") REFERENCES "pokemon_v2_berryfirmness" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryfirmnessname_468679bd ON "pokemon_v2_berryfirmnessname" ("language_id"); ALTER TABLE "pokemon_v2_berryfirmnessname" ADD CONSTRAINT "pokemon_v_language_id_4ea6d90c160888d_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contestcombo_61dbcf83 ON "pokemon_v2_contestcombo" ("first_move_id"); ALTER TABLE "pokemon_v2_contestcombo" ADD CONSTRAINT "pokemon_v2_first_move_id_7c51d0be2d87290a_fk_pokemon_v2_move_id" FOREIGN KEY ("first_move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contestcombo_b7334d4b ON "pokemon_v2_contestcombo" ("second_move_id"); ALTER TABLE "pokemon_v2_contestcombo" ADD CONSTRAINT "pokemon_v2_second_move_id_f4cea3ad12ee535_fk_pokemon_v2_move_id" FOREIGN KEY ("second_move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesttypename_88859fa8 ON "pokemon_v2_contesttypename" ("contest_type_id"); ALTER TABLE "pokemon_v2_contesttypename" ADD CONSTRAINT "p_contest_type_id_72031bc113d4bcb7_fk_pokemon_v2_contesttype_id" FOREIGN KEY ("contest_type_id") REFERENCES "pokemon_v2_contesttype" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesttypename_468679bd ON "pokemon_v2_contesttypename" ("language_id"); ALTER TABLE "pokemon_v2_contesttypename" ADD CONSTRAINT "pokemon__language_id_23223039d158c3ac_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryflavor_88859fa8 ON "pokemon_v2_berryflavor" ("contest_type_id"); ALTER TABLE "pokemon_v2_berryflavor" ADD CONSTRAINT "p_contest_type_id_4261b26f3f6e75e4_fk_pokemon_v2_contesttype_id" FOREIGN KEY ("contest_type_id") REFERENCES "pokemon_v2_contesttype" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berry_cac15508 ON "pokemon_v2_berry" ("berry_firmness_id"); ALTER TABLE "pokemon_v2_berry" ADD CONSTRAINT "b9662e3b63788fce5a8a6a4711bc7456" FOREIGN KEY ("berry_firmness_id") REFERENCES "pokemon_v2_berryfirmness" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berry_82bfda79 ON "pokemon_v2_berry" ("item_id"); ALTER TABLE "pokemon_v2_berry" ADD CONSTRAINT "pokemon_v2_berry_item_id_70798e2d1ed2b698_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_regionname_468679bd ON "pokemon_v2_regionname" ("language_id"); ALTER TABLE "pokemon_v2_regionname" ADD CONSTRAINT "pokemon__language_id_680aac4d4405e327_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_regionname_0f442f96 ON "pokemon_v2_regionname" ("region_id"); ALTER TABLE "pokemon_v2_regionname" ADD CONSTRAINT "pokemon_v2_re_region_id_deff5d8e2681521_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_generation_0f442f96 ON "pokemon_v2_generation" ("region_id"); ALTER TABLE "pokemon_v2_generation" ADD CONSTRAINT "pokemon_v2_g_region_id_3f3d893d496d3e0e_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedex_0f442f96 ON "pokemon_v2_pokedex" ("region_id"); ALTER TABLE "pokemon_v2_pokedex" ADD CONSTRAINT "pokemon_v2_po_region_id_1c5cb13a9944649_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versiongroupregion_0f442f96 ON "pokemon_v2_versiongroupregion" ("region_id"); ALTER TABLE "pokemon_v2_versiongroupregion" ADD CONSTRAINT "pokemon_v2_v_region_id_50e2259478dabf71_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_location_0f442f96 ON "pokemon_v2_location" ("region_id"); ALTER TABLE "pokemon_v2_location" ADD CONSTRAINT "pokemon_v2_l_region_id_52ba86b8a6e45daf_fk_pokemon_v2_region_id" FOREIGN KEY ("region_id") REFERENCES "pokemon_v2_region" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationarea_e274a5da ON "pokemon_v2_locationarea" ("location_id"); ALTER TABLE "pokemon_v2_locationarea" ADD CONSTRAINT "pokemon_v2_location_id_9ff3c5ffccd42d_fk_pokemon_v2_location_id" FOREIGN KEY ("location_id") REFERENCES "pokemon_v2_location" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationareaencounterrate_f5689235 ON "pokemon_v2_locationareaencounterrate" ("location_area_id"); ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD CONSTRAINT "D2d7eb07b5d3064192ed57526abefbb2" FOREIGN KEY ("location_area_id") REFERENCES "pokemon_v2_locationarea" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationareaencounterrate_316e8552 ON "pokemon_v2_locationareaencounterrate" ("version_id"); ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD CONSTRAINT "pokemon_v2_version_id_40344f5409798237_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationareaname_468679bd ON "pokemon_v2_locationareaname" ("language_id"); ALTER TABLE "pokemon_v2_locationareaname" ADD CONSTRAINT "pokemon_v_language_id_ed97aac0f4e1d3b_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationareaname_f5689235 ON "pokemon_v2_locationareaname" ("location_area_id"); ALTER TABLE "pokemon_v2_locationareaname" ADD CONSTRAINT "location_area_id_442802757be65db_fk_pokemon_v2_locationarea_id" FOREIGN KEY ("location_area_id") REFERENCES "pokemon_v2_locationarea" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationgameindex_52c01041 ON "pokemon_v2_locationgameindex" ("generation_id"); ALTER TABLE "pokemon_v2_locationgameindex" ADD CONSTRAINT "poke_generation_id_51e5b2fa2badbb3c_fk_pokemon_v2_generation_id" FOREIGN KEY ("generation_id") REFERENCES "pokemon_v2_generation" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationgameindex_e274a5da ON "pokemon_v2_locationgameindex" ("location_id"); ALTER TABLE "pokemon_v2_locationgameindex" ADD CONSTRAINT "pokemon__location_id_6d4b5d887d9ee791_fk_pokemon_v2_location_id" FOREIGN KEY ("location_id") REFERENCES "pokemon_v2_location" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationname_468679bd ON "pokemon_v2_locationname" ("language_id"); ALTER TABLE "pokemon_v2_locationname" ADD CONSTRAINT "pokemon_v_language_id_d53dd4d20c6cb06_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationname_e274a5da ON "pokemon_v2_locationname" ("location_id"); ALTER TABLE "pokemon_v2_locationname" ADD CONSTRAINT "pokemon__location_id_5f1699f0b373d327_fk_pokemon_v2_location_id" FOREIGN KEY ("location_id") REFERENCES "pokemon_v2_location" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounter_f5689235 ON "pokemon_v2_encounter" ("location_area_id"); ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "e557d11419f42576e0a18e3e18c44bae" FOREIGN KEY ("location_area_id") REFERENCES "pokemon_v2_locationarea" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounter_acf1160d ON "pokemon_v2_encounter" ("pokemon_id"); ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "pokemon_v2_pokemon_id_3bae3e5349b8fb62_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounter_316e8552 ON "pokemon_v2_encounter" ("version_id"); ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "pokemon_v2_version_id_27a3b8f0898e90b9_fk_pokemon_v2_version_id" FOREIGN KEY ("version_id") REFERENCES "pokemon_v2_version" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionname_0f768e83 ON "pokemon_v2_encounterconditionname" ("encounter_condition_id"); ALTER TABLE "pokemon_v2_encounterconditionname" ADD CONSTRAINT "f3eb7045826fac77637f3e664582bff2" FOREIGN KEY ("encounter_condition_id") REFERENCES "pokemon_v2_encountercondition" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionname_468679bd ON "pokemon_v2_encounterconditionname" ("language_id"); ALTER TABLE "pokemon_v2_encounterconditionname" ADD CONSTRAINT "pokemon_v_language_id_35e120bc5f19385_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionvalue_0f768e83 ON "pokemon_v2_encounterconditionvalue" ("encounter_condition_id"); ALTER TABLE "pokemon_v2_encounterconditionvalue" ADD CONSTRAINT "D28801a9cc8cf5e39f87bb297104b19d" FOREIGN KEY ("encounter_condition_id") REFERENCES "pokemon_v2_encountercondition" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionvaluemap_9f2ac49f ON "pokemon_v2_encounterconditionvaluemap" ("encounter_id"); ALTER TABLE "pokemon_v2_encounterconditionvaluemap" ADD CONSTRAINT "pokemo_encounter_id_5a27d907e50fb31d_fk_pokemon_v2_encounter_id" FOREIGN KEY ("encounter_id") REFERENCES "pokemon_v2_encounter" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionvaluemap_b468ba75 ON "pokemon_v2_encounterconditionvaluemap" ("encounter_condition_value_id"); ALTER TABLE "pokemon_v2_encounterconditionvaluemap" ADD CONSTRAINT "fb397f34a8da5180d3d96e8aab00a9f8" FOREIGN KEY ("encounter_condition_value_id") REFERENCES "pokemon_v2_encounterconditionvalue" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionvaluename_b468ba75 ON "pokemon_v2_encounterconditionvaluename" ("encounter_condition_value_id"); ALTER TABLE "pokemon_v2_encounterconditionvaluename" ADD CONSTRAINT "fd90a5628e308ec4fc5c34e78136dd60" FOREIGN KEY ("encounter_condition_value_id") REFERENCES "pokemon_v2_encounterconditionvalue" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterconditionvaluename_468679bd ON "pokemon_v2_encounterconditionvaluename" ("language_id"); ALTER TABLE "pokemon_v2_encounterconditionvaluename" ADD CONSTRAINT "pokemon__language_id_668c722804740437_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encountermethodname_e5b4335b ON "pokemon_v2_encountermethodname" ("encounter_method_id"); ALTER TABLE "pokemon_v2_encountermethodname" ADD CONSTRAINT "D6468313813b15a1d34dde7e825e93b7" FOREIGN KEY ("encounter_method_id") REFERENCES "pokemon_v2_encountermethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encountermethodname_468679bd ON "pokemon_v2_encountermethodname" ("language_id"); ALTER TABLE "pokemon_v2_encountermethodname" ADD CONSTRAINT "pokemon__language_id_12f265e7f054b738_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterslot_e5b4335b ON "pokemon_v2_encounterslot" ("encounter_method_id"); ALTER TABLE "pokemon_v2_encounterslot" ADD CONSTRAINT "D513ce8bc914169f61a56ebcb41ec93e" FOREIGN KEY ("encounter_method_id") REFERENCES "pokemon_v2_encountermethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounterslot_e8509701 ON "pokemon_v2_encounterslot" ("version_group_id"); ALTER TABLE "pokemon_v2_encounterslot" ADD CONSTRAINT "b8b7a85fdbc365776fdca885c1b61144" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_locationareaencounterrate_e5b4335b ON "pokemon_v2_locationareaencounterrate" ("encounter_method_id"); ALTER TABLE "pokemon_v2_locationareaencounterrate" ADD CONSTRAINT "D091faf27cba163f08805d3e60b9ac39" FOREIGN KEY ("encounter_method_id") REFERENCES "pokemon_v2_encountermethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_encounter_26d10da8 ON "pokemon_v2_encounter" ("encounter_slot_id"); ALTER TABLE "pokemon_v2_encounter" ADD CONSTRAINT "D259cdde341f3eefc0ceabef213cba1d" FOREIGN KEY ("encounter_slot_id") REFERENCES "pokemon_v2_encounterslot" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_palparkareaname_468679bd ON "pokemon_v2_palparkareaname" ("language_id"); ALTER TABLE "pokemon_v2_palparkareaname" ADD CONSTRAINT "pokemon__language_id_5142fbcfe5a8e590_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_palparkareaname_fd9c66e2 ON "pokemon_v2_palparkareaname" ("pal_park_area_id"); ALTER TABLE "pokemon_v2_palparkareaname" ADD CONSTRAINT "pal_park_area_id_5d18416ec714c96f_fk_pokemon_v2_palparkarea_id" FOREIGN KEY ("pal_park_area_id") REFERENCES "pokemon_v2_palparkarea" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokeathlonstatname_468679bd ON "pokemon_v2_pokeathlonstatname" ("language_id"); ALTER TABLE "pokemon_v2_pokeathlonstatname" ADD CONSTRAINT "pokemon__language_id_1c506fe8de257da8_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokeathlonstatname_4ec8d896 ON "pokemon_v2_pokeathlonstatname" ("pokeathlon_stat_id"); ALTER TABLE "pokemon_v2_pokeathlonstatname" ADD CONSTRAINT "D5c1812f6d0af77a148b448138440cbd" FOREIGN KEY ("pokeathlon_stat_id") REFERENCES "pokemon_v2_pokeathlonstat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_supercontestcombo_61dbcf83 ON "pokemon_v2_supercontestcombo" ("first_move_id"); ALTER TABLE "pokemon_v2_supercontestcombo" ADD CONSTRAINT "pokemon_v2_first_move_id_2c8eafd9724e875e_fk_pokemon_v2_move_id" FOREIGN KEY ("first_move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_supercontestcombo_b7334d4b ON "pokemon_v2_supercontestcombo" ("second_move_id"); ALTER TABLE "pokemon_v2_supercontestcombo" ADD CONSTRAINT "pokemon_v_second_move_id_399894d6e90a5e63_fk_pokemon_v2_move_id" FOREIGN KEY ("second_move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_palpark_fd9c66e2 ON "pokemon_v2_palpark" ("pal_park_area_id"); ALTER TABLE "pokemon_v2_palpark" ADD CONSTRAINT "pal_park_area_id_5e47afab126f33d9_fk_pokemon_v2_palparkarea_id" FOREIGN KEY ("pal_park_area_id") REFERENCES "pokemon_v2_palparkarea" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_palpark_8906fd21 ON "pokemon_v2_palpark" ("pokemon_species_id"); ALTER TABLE "pokemon_v2_palpark" ADD CONSTRAINT "D9aee8836dddd5eb199fe0dd59bb6594" FOREIGN KEY ("pokemon_species_id") REFERENCES "pokemon_v2_pokemonspecies" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturepokeathlonstat_4ec8d896 ON "pokemon_v2_naturepokeathlonstat" ("pokeathlon_stat_id"); ALTER TABLE "pokemon_v2_naturepokeathlonstat" ADD CONSTRAINT "D86b75d46724f2a5d094ae378ae11781" FOREIGN KEY ("pokeathlon_stat_id") REFERENCES "pokemon_v2_pokeathlonstat" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typeefficacy_7edca3b3 ON "pokemon_v2_typeefficacy" ("damage_type_id"); ALTER TABLE "pokemon_v2_typeefficacy" ADD CONSTRAINT "pokemon_v_damage_type_id_6b875ff31e2d08c9_fk_pokemon_v2_type_id" FOREIGN KEY ("damage_type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_typeefficacy_bac75ed4 ON "pokemon_v2_typeefficacy" ("target_type_id"); ALTER TABLE "pokemon_v2_typeefficacy" ADD CONSTRAINT "pokemon_v_target_type_id_44a3d54a868ffc01_fk_pokemon_v2_type_id" FOREIGN KEY ("target_type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonmove_ed28b15b ON "pokemon_v2_pokemonmove" ("move_learn_method_id"); ALTER TABLE "pokemon_v2_pokemonmove" ADD CONSTRAINT "c56bbe242ad2a60b9e6b85930f5b984f" FOREIGN KEY ("move_learn_method_id") REFERENCES "pokemon_v2_movelearnmethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versiongroupmovelearnmethod_ed28b15b ON "pokemon_v2_versiongroupmovelearnmethod" ("move_learn_method_id"); ALTER TABLE "pokemon_v2_versiongroupmovelearnmethod" ADD CONSTRAINT "D8dbfc14d88663c6946b5aaba056bf13" FOREIGN KEY ("move_learn_method_id") REFERENCES "pokemon_v2_movelearnmethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_versiongroupmovelearnmethod_e8509701 ON "pokemon_v2_versiongroupmovelearnmethod" ("version_group_id"); ALTER TABLE "pokemon_v2_versiongroupmovelearnmethod" ADD CONSTRAINT "a07ba57a627860bb068d3ca3bf294036" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributedescription_b3244364 ON "pokemon_v2_itemattributedescription" ("item_attribute_id"); ALTER TABLE "pokemon_v2_itemattributedescription" ADD CONSTRAINT "D19865ef7dec245ced8bac3866c911ba" FOREIGN KEY ("item_attribute_id") REFERENCES "pokemon_v2_itemattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributedescription_468679bd ON "pokemon_v2_itemattributedescription" ("language_id"); ALTER TABLE "pokemon_v2_itemattributedescription" ADD CONSTRAINT "pokemon__language_id_29873dd27bc7d395_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributemap_82bfda79 ON "pokemon_v2_itemattributemap" ("item_id"); ALTER TABLE "pokemon_v2_itemattributemap" ADD CONSTRAINT "pokemon_v2_itemat_item_id_37ce1702463a9a6_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributemap_b3244364 ON "pokemon_v2_itemattributemap" ("item_attribute_id"); ALTER TABLE "pokemon_v2_itemattributemap" ADD CONSTRAINT "bfe2048eb86b73d467b1955d8a1c53c6" FOREIGN KEY ("item_attribute_id") REFERENCES "pokemon_v2_itemattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_languagename_9b3e442c ON "pokemon_v2_languagename" ("local_language_id"); ALTER TABLE "pokemon_v2_languagename" ADD CONSTRAINT "po_local_language_id_497148e369dfe173_fk_pokemon_v2_language_id" FOREIGN KEY ("local_language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributename_b3244364 ON "pokemon_v2_itemattributename" ("item_attribute_id"); ALTER TABLE "pokemon_v2_itemattributename" ADD CONSTRAINT "e9e9fc3592ac4c72cd4e786a73f0a904" FOREIGN KEY ("item_attribute_id") REFERENCES "pokemon_v2_itemattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemattributename_468679bd ON "pokemon_v2_itemattributename" ("language_id"); ALTER TABLE "pokemon_v2_itemattributename" ADD CONSTRAINT "pokemon__language_id_298709c472377ca5_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributedescription_468679bd ON "pokemon_v2_moveattributedescription" ("language_id"); ALTER TABLE "pokemon_v2_moveattributedescription" ADD CONSTRAINT "pokemon__language_id_47c2a92b2ca9024b_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributedescription_8c8b6d23 ON "pokemon_v2_moveattributedescription" ("move_attribute_id"); ALTER TABLE "pokemon_v2_moveattributedescription" ADD CONSTRAINT "D7e63e22b956fe5ba71141636b06dc6e" FOREIGN KEY ("move_attribute_id") REFERENCES "pokemon_v2_moveattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributemap_2a315a20 ON "pokemon_v2_moveattributemap" ("move_id"); ALTER TABLE "pokemon_v2_moveattributemap" ADD CONSTRAINT "pokemon_v2_movea_move_id_76c16fad50d78f9e_fk_pokemon_v2_move_id" FOREIGN KEY ("move_id") REFERENCES "pokemon_v2_move" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributemap_8c8b6d23 ON "pokemon_v2_moveattributemap" ("move_attribute_id"); ALTER TABLE "pokemon_v2_moveattributemap" ADD CONSTRAINT "D5c16e5be8b00508d0ccf779217cb38f" FOREIGN KEY ("move_attribute_id") REFERENCES "pokemon_v2_moveattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributename_468679bd ON "pokemon_v2_moveattributename" ("language_id"); ALTER TABLE "pokemon_v2_moveattributename" ADD CONSTRAINT "pokemon__language_id_30a37b2d02b5aeeb_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveattributename_8c8b6d23 ON "pokemon_v2_moveattributename" ("move_attribute_id"); ALTER TABLE "pokemon_v2_moveattributename" ADD CONSTRAINT "D05d6095c726d4cc8de38d3b08b5b2ac" FOREIGN KEY ("move_attribute_id") REFERENCES "pokemon_v2_moveattribute" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movedamageclassname_468679bd ON "pokemon_v2_movedamageclassname" ("language_id"); ALTER TABLE "pokemon_v2_movedamageclassname" ADD CONSTRAINT "pokemon__language_id_56fbe42373bba870_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movedamageclassname_15214d2a ON "pokemon_v2_movedamageclassname" ("move_damage_class_id"); ALTER TABLE "pokemon_v2_movedamageclassname" ADD CONSTRAINT "ddc1fab9af6a03ba659ac7a65d398e47" FOREIGN KEY ("move_damage_class_id") REFERENCES "pokemon_v2_movedamageclass" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movetargetname_468679bd ON "pokemon_v2_movetargetname" ("language_id"); ALTER TABLE "pokemon_v2_movetargetname" ADD CONSTRAINT "pokemon__language_id_4eaf5b17cd3c30eb_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movetargetname_2646ccd3 ON "pokemon_v2_movetargetname" ("move_target_id"); ALTER TABLE "pokemon_v2_movetargetname" ADD CONSTRAINT "poke_move_target_id_200c724b0142ff7_fk_pokemon_v2_movetarget_id" FOREIGN KEY ("move_target_id") REFERENCES "pokemon_v2_movetarget" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexname_468679bd ON "pokemon_v2_pokedexname" ("language_id"); ALTER TABLE "pokemon_v2_pokedexname" ADD CONSTRAINT "pokemon__language_id_756f3faa3e1e1e7a_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokedexname_066873eb ON "pokemon_v2_pokedexname" ("pokedex_id"); ALTER TABLE "pokemon_v2_pokedexname" ADD CONSTRAINT "pokemon_v2__pokedex_id_35eeb9b1a4a273d_fk_pokemon_v2_pokedex_id" FOREIGN KEY ("pokedex_id") REFERENCES "pokemon_v2_pokedex" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movelearnmethoddescription_468679bd ON "pokemon_v2_movelearnmethoddescription" ("language_id"); ALTER TABLE "pokemon_v2_movelearnmethoddescription" ADD CONSTRAINT "pokemon__language_id_44fe72c6c8c75262_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_movelearnmethoddescription_ed28b15b ON "pokemon_v2_movelearnmethoddescription" ("move_learn_method_id"); ALTER TABLE "pokemon_v2_movelearnmethoddescription" ADD CONSTRAINT "e5cb85a216be7cf359e05d8a0ae9bd63" FOREIGN KEY ("move_learn_method_id") REFERENCES "pokemon_v2_movelearnmethod" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilitychangeeffecttext_242c4a82 ON "pokemon_v2_abilitychangeeffecttext" ("ability_change_id"); ALTER TABLE "pokemon_v2_abilitychangeeffecttext" ADD CONSTRAINT "D68cbe68af4bce877036068ab37daad2" FOREIGN KEY ("ability_change_id") REFERENCES "pokemon_v2_abilitychange" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilitychangeeffecttext_468679bd ON "pokemon_v2_abilitychangeeffecttext" ("language_id"); ALTER TABLE "pokemon_v2_abilitychangeeffecttext" ADD CONSTRAINT "pokemon__language_id_6720150c9359af2f_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityeffecttext_ca1a862d ON "pokemon_v2_abilityeffecttext" ("ability_id"); ALTER TABLE "pokemon_v2_abilityeffecttext" ADD CONSTRAINT "pokemon_v2_ability_id_3bb9c34d0fc46ec0_fk_pokemon_v2_ability_id" FOREIGN KEY ("ability_id") REFERENCES "pokemon_v2_ability" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilityeffecttext_468679bd ON "pokemon_v2_abilityeffecttext" ("language_id"); ALTER TABLE "pokemon_v2_abilityeffecttext" ADD CONSTRAINT "pokemon__language_id_359734440182f5f7_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemeffecttext_82bfda79 ON "pokemon_v2_itemeffecttext" ("item_id"); ALTER TABLE "pokemon_v2_itemeffecttext" ADD CONSTRAINT "pokemon_v2_iteme_item_id_56514d19dc0553ec_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemeffecttext_468679bd ON "pokemon_v2_itemeffecttext" ("language_id"); ALTER TABLE "pokemon_v2_itemeffecttext" ADD CONSTRAINT "pokemon__language_id_2dfb15130863618d_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesteffecteffecttext_b38be813 ON "pokemon_v2_contesteffecteffecttext" ("contest_effect_id"); ALTER TABLE "pokemon_v2_contesteffecteffecttext" ADD CONSTRAINT "D689baf8e6c467dfaba3d22adf3ac151" FOREIGN KEY ("contest_effect_id") REFERENCES "pokemon_v2_contesteffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesteffecteffecttext_468679bd ON "pokemon_v2_contesteffecteffecttext" ("language_id"); ALTER TABLE "pokemon_v2_contesteffecteffecttext" ADD CONSTRAINT "pokemon__language_id_63ab554125328064_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffectchangeeffecttext_468679bd ON "pokemon_v2_moveeffectchangeeffecttext" ("language_id"); ALTER TABLE "pokemon_v2_moveeffectchangeeffecttext" ADD CONSTRAINT "pokemon__language_id_64dcd92e1622629a_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffectchangeeffecttext_3da28349 ON "pokemon_v2_moveeffectchangeeffecttext" ("move_effect_change_id"); ALTER TABLE "pokemon_v2_moveeffectchangeeffecttext" ADD CONSTRAINT "D975965fc3d4e7869e55d3765bedc39e" FOREIGN KEY ("move_effect_change_id") REFERENCES "pokemon_v2_moveeffectchange" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffecteffecttext_468679bd ON "pokemon_v2_moveeffecteffecttext" ("language_id"); ALTER TABLE "pokemon_v2_moveeffecteffecttext" ADD CONSTRAINT "pokemon_v_language_id_7306c193b51150c_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_moveeffecteffecttext_f1ea6a35 ON "pokemon_v2_moveeffecteffecttext" ("move_effect_id"); ALTER TABLE "pokemon_v2_moveeffecteffecttext" ADD CONSTRAINT "pok_move_effect_id_2041ce857cdb0b14_fk_pokemon_v2_moveeffect_id" FOREIGN KEY ("move_effect_id") REFERENCES "pokemon_v2_moveeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_supercontesteffectflavortext_468679bd ON "pokemon_v2_supercontesteffectflavortext" ("language_id"); ALTER TABLE "pokemon_v2_supercontesteffectflavortext" ADD CONSTRAINT "pokemon__language_id_7601ee4b61d78acb_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_supercontesteffectflavortext_09a4506b ON "pokemon_v2_supercontesteffectflavortext" ("super_contest_effect_id"); ALTER TABLE "pokemon_v2_supercontesteffectflavortext" ADD CONSTRAINT "D8555617b3efcf057fabed7b5387cbc4" FOREIGN KEY ("super_contest_effect_id") REFERENCES "pokemon_v2_supercontesteffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesteffectflavortext_b38be813 ON "pokemon_v2_contesteffectflavortext" ("contest_effect_id"); ALTER TABLE "pokemon_v2_contesteffectflavortext" ADD CONSTRAINT "D98ac024639488654c078affa87f100c" FOREIGN KEY ("contest_effect_id") REFERENCES "pokemon_v2_contesteffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_contesteffectflavortext_468679bd ON "pokemon_v2_contesteffectflavortext" ("language_id"); ALTER TABLE "pokemon_v2_contesteffectflavortext" ADD CONSTRAINT "pokemon__language_id_4fccdc767f7a2e65_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonevolution_e274a5da ON "pokemon_v2_pokemonevolution" ("location_id"); ALTER TABLE "pokemon_v2_pokemonevolution" ADD CONSTRAINT "pokemon__location_id_160463522dcda603_fk_pokemon_v2_location_id" FOREIGN KEY ("location_id") REFERENCES "pokemon_v2_location" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_naturebattlestylepreference_68cebe94 ON "pokemon_v2_naturebattlestylepreference" ("move_battle_style_id"); ALTER TABLE "pokemon_v2_naturebattlestylepreference" ADD CONSTRAINT "D006bc8fa29be32118eff6dcf6121211" FOREIGN KEY ("move_battle_style_id") REFERENCES "pokemon_v2_movebattlestyle" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_abilitychange_e8509701 ON "pokemon_v2_abilitychange" ("version_group_id"); ALTER TABLE "pokemon_v2_abilitychange" ADD CONSTRAINT "D3ba6ce346c5139914241969810f57be" FOREIGN KEY ("version_group_id") REFERENCES "pokemon_v2_versiongroup" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryflavorname_3a5c30bd ON "pokemon_v2_berryflavorname" ("berry_flavor_id"); ALTER TABLE "pokemon_v2_berryflavorname" ADD CONSTRAINT "p_berry_flavor_id_29c5659af7d856db_fk_pokemon_v2_berryflavor_id" FOREIGN KEY ("berry_flavor_id") REFERENCES "pokemon_v2_berryflavor" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryflavorname_468679bd ON "pokemon_v2_berryflavorname" ("language_id"); ALTER TABLE "pokemon_v2_berryflavorname" ADD CONSTRAINT "pokemon__language_id_6d0e31aec01ebbfc_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryflavormap_a7d36936 ON "pokemon_v2_berryflavormap" ("berry_id"); ALTER TABLE "pokemon_v2_berryflavormap" ADD CONSTRAINT "pokemon_v2_ber_berry_id_48eb07f31fb680bf_fk_pokemon_v2_berry_id" FOREIGN KEY ("berry_id") REFERENCES "pokemon_v2_berry" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berryflavormap_3a5c30bd ON "pokemon_v2_berryflavormap" ("berry_flavor_id"); ALTER TABLE "pokemon_v2_berryflavormap" ADD CONSTRAINT "po_berry_flavor_id_4378afea9636f67_fk_pokemon_v2_berryflavor_id" FOREIGN KEY ("berry_flavor_id") REFERENCES "pokemon_v2_berryflavor" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemflingeffecteffecttext_5cc6ac4e ON "pokemon_v2_itemflingeffecteffecttext" ("item_fling_effect_id"); ALTER TABLE "pokemon_v2_itemflingeffecteffecttext" ADD CONSTRAINT "D9bd7f364dea2de432dd59e733414e68" FOREIGN KEY ("item_fling_effect_id") REFERENCES "pokemon_v2_itemflingeffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemflingeffecteffecttext_468679bd ON "pokemon_v2_itemflingeffecteffecttext" ("language_id"); ALTER TABLE "pokemon_v2_itemflingeffecteffecttext" ADD CONSTRAINT "pokemon__language_id_6c648b084433c08f_fk_pokemon_v2_language_id" FOREIGN KEY ("language_id") REFERENCES "pokemon_v2_language" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_b38be813 ON "pokemon_v2_move" ("contest_effect_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "e97f00558755c02da83899f03eee758e" FOREIGN KEY ("contest_effect_id") REFERENCES "pokemon_v2_contesteffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_88859fa8 ON "pokemon_v2_move" ("contest_type_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "p_contest_type_id_4ac65d66273f6090_fk_pokemon_v2_contesttype_id" FOREIGN KEY ("contest_type_id") REFERENCES "pokemon_v2_contesttype" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_move_09a4506b ON "pokemon_v2_move" ("super_contest_effect_id"); ALTER TABLE "pokemon_v2_move" ADD CONSTRAINT "d5f08e19e16548b8d876cd54d2684872" FOREIGN KEY ("super_contest_effect_id") REFERENCES "pokemon_v2_supercontesteffect" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_berry_e81d5c46 ON "pokemon_v2_berry" ("natural_gift_type_id"); ALTER TABLE "pokemon_v2_berry" ADD CONSTRAINT "pok_natural_gift_type_id_1a23fb2905022b71_fk_pokemon_v2_type_id" FOREIGN KEY ("natural_gift_type_id") REFERENCES "pokemon_v2_type" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonsprites_acf1160d ON "pokemon_v2_pokemonsprites" ("pokemon_id"); ALTER TABLE "pokemon_v2_pokemonsprites" ADD CONSTRAINT "pokemon_v2_pokemon_id_2c6fc4cc4144650d_fk_pokemon_v2_pokemon_id" FOREIGN KEY ("pokemon_id") REFERENCES "pokemon_v2_pokemon" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_itemsprites_82bfda79 ON "pokemon_v2_itemsprites" ("item_id"); ALTER TABLE "pokemon_v2_itemsprites" ADD CONSTRAINT "pokemon_v2_itemsp_item_id_aaf42930681d3ff_fk_pokemon_v2_item_id" FOREIGN KEY ("item_id") REFERENCES "pokemon_v2_item" ("id") DEFERRABLE INITIALLY DEFERRED; CREATE INDEX pokemon_v2_pokemonformsprites_277de582 ON "pokemon_v2_pokemonformsprites" ("pokemon_form_id"); ALTER TABLE "pokemon_v2_pokemonformsprites" ADD CONSTRAINT "p_pokemon_form_id_7382ec8a2bfd50c1_fk_pokemon_v2_pokemonform_id" FOREIGN KEY ("pokemon_form_id") REFERENCES "pokemon_v2_pokemonform" ("id") DEFERRABLE INITIALLY DEFERRED; COMMIT;