Обновить shema

This commit is contained in:
2026-09-29 09:37:47 +00:00
parent 01a3b76ec1
commit 5c25e1f6d8
+17 -15
View File
@@ -1,12 +1,15 @@
drop table if exists card_set;
create table card_set (
CARD_SET_NAME VARCHAR(255) not null,
CARD_SET_ID VARCHAR(20) PRIMARY key,
CARD_SET_SERIES VARCHAR(50) not null,
CARD_SET_TOTAL_CARDS inteGER not null,
CARD_SET_data date not null
set_name VARCHAR(255) not null,
set_id VARCHAR(20) PRIMARY key,
set_series VARCHAR(20) not null,
set_total_cards INT not null,
set_release_date date not null
);
insert into card_set (CARD_SET_NAME, CARD_SET_ID, CARD_SET_SERIES, CARD_SET_TOTAL_CARDS, CARD_SET_data) values
insert into card_set (set_name,set_id,set_series,set_total_cards,set_release_date ) values
('XY Базовый набор', 'XY1', 'XY', 146, '2014-02-05'),
('XY Огненная вспышка', 'XY2', 'XY', 106, '2014-05-07'),
('XY Яростный кулак', 'XY3', 'XY', 111, '2014-08-13'),
@@ -19,15 +22,14 @@ insert into card_set (CARD_SET_NAME, CARD_SET_ID, CARD_SET_SERIES, CARD_SET_TOTA
('XY Столкновение судеб', 'XY10', 'XY', 124, '2016-05-02');
create table card (
card_id int primary key,
card_name VARCHAR(50) not null,
card_number VARCHAR(50) not null,
card_set_id int references card_set (card_set_id),
card_name text not null,
card_rarity text not null ,
card_type text not null,
card_image_url text not null,
CONSTRAINT unique_set_number unique (card_set_id, card_number)
card_id int primary key,
card_name text not null,
card_number text not null,
card_set_id VARCHAR(20) references card_set(set_id),
card_rarity text not null,
card_type text not null,
card_image_url text not null,
unique (card_set_id, card_number)
);
create table pokemon_card (