Обновить shema

This commit is contained in:
2026-09-30 11:21:19 +00:00
parent 9c1e7c8f50
commit df98e45792
+6 -5
View File
@@ -139,8 +139,9 @@ create table game_mechanic (
);
create table pokemon_species (
species_pokedex_number INT generated always as identity primary key,
species_eng_game TEXT unique not null,
species_id INT primary key
species_pokedex_number INT unique,
species_eng_game TEXT not null,
species_generation INT,
species_heigth_m NUMERIC,
species_weigth_m NUMERIC
@@ -152,14 +153,14 @@ INSERT INTO pokemon_species (pokemon_pokedex_number, species_eng_name, species_g
(448, 'Lucario', 4, 1.2, 54.0);
create table pokedex_entry (
entry_id INT generated always as identity primary key,
entry_id INT primary key,
entry_pokedex_number INT not null references pokemon_species(species_pokedex_number) on delete cascade,
entry_source_game TEXT,
entry_description TEXT
);
create table trainer_card (
trainer_card_id INT generated always as identity primary key references card(card_id) on delete cascade,
trainer_card_id INT primary key references card(card_id) on delete cascade,
trainer_printed_type_id INT references trainer_printed_type(printed_type_id),
trainer_effect_text TEXT,
trainer_is_ace_spec BOOLEAN not null default false
@@ -172,7 +173,7 @@ INSERT INTO trainer_card (
(88, 2, 'Switch your Active Pokémon with 1 of your Benched Pokémon.', FALSE);
create table energy_card (
energy_card_id INT generated always as identity primary key references card(card_id) on delete cascade,
energy_card_id INT primary key references card(card_id) on delete cascade,
energy_is_special BOOLEAN not null default false,
energy_main_type_id INT references energy_type(energy_type_id),
energy_effect_text TEXT