forked from admin/template
Обновить lesson2.sql
This commit is contained in:
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
create table card (
|
CREATE TABLE card (
|
||||||
card_id int [primary key]
|
card_id int [primary key]
|
||||||
card_name text [not null, unique]
|
card_name text [not null, unique]
|
||||||
card_hp int [not null]
|
card_hp int [not null]
|
||||||
@@ -6,36 +6,36 @@ create table card (
|
|||||||
card_illustrator_id int [not null]
|
card_illustrator_id int [not null]
|
||||||
);
|
);
|
||||||
|
|
||||||
create table illustrator (
|
CREATE TABLE illustrator (
|
||||||
illustrator_id int [primary key]
|
illustrator_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||||
illustrator_name text [not null]
|
illustrator_name TEXT NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
create table card_set (
|
CREATE TABLE card_set (
|
||||||
card_set_id int [primary key]
|
card_set_id int [primary key]
|
||||||
card_set_name text [not null, unique]
|
card_set_name text [not null, unique]
|
||||||
card_set_code text [not null, unique]
|
card_set_code text [not null, unique]
|
||||||
card_set_release_date date [not null]
|
card_set_release_date date [not null]
|
||||||
);
|
);
|
||||||
|
|
||||||
create table card_attack (
|
CREATE TABLE card_attack (
|
||||||
card_attack_id int [primary key]
|
card_attack_id int [primary key]
|
||||||
card_id int [not null]
|
card_id int [not null]
|
||||||
attack_id int [not null]
|
attack_id int [not null]
|
||||||
);
|
);
|
||||||
|
|
||||||
create table attack (
|
CREATE TABLE attack (
|
||||||
attack_id int [primary key]
|
attack_id int [primary key]
|
||||||
attack_name text [not null]
|
attack_name text [not null]
|
||||||
attack_base_damage int [not null]
|
attack_base_damage int [not null]
|
||||||
);
|
);
|
||||||
|
|
||||||
create table element_type (
|
CREATE TABLE element_type (
|
||||||
element_id int [primary key]
|
element_type_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||||
element_name text [not null, unique]
|
element_type_name TEXT NOT NULL UNIQUE
|
||||||
);
|
);
|
||||||
|
|
||||||
create table attack_energy_cost (
|
CREATE TABLE attack_energy_cost (
|
||||||
attack_energy_cost_id int [primary key]
|
attack_energy_cost_id int [primary key]
|
||||||
attack_id int [not null]
|
attack_id int [not null]
|
||||||
element_type_id int [not null]
|
element_type_id int [not null]
|
||||||
|
|||||||
Reference in New Issue
Block a user