forked from admin/template
Обновить lesson0.sql
This commit is contained in:
+17
-13
@@ -1,4 +1,4 @@
|
|||||||
Table: card {
|
create Table: card (
|
||||||
card_id: int (primary key, NOT NULL, UNIQUE, CHECK(card_id > 0))
|
card_id: int (primary key, NOT NULL, UNIQUE, CHECK(card_id > 0))
|
||||||
card_name: Text (NOT NULL)
|
card_name: Text (NOT NULL)
|
||||||
card hp: int (NOT NULL)
|
card hp: int (NOT NULL)
|
||||||
@@ -6,18 +6,8 @@ Table: card {
|
|||||||
illustrator_id: int (NOT NULL)
|
illustrator_id: int (NOT NULL)
|
||||||
element_type_id: int (NOT NULL)
|
element_type_id: int (NOT NULL)
|
||||||
card_set_id: int (NOT NULL)
|
card_set_id: int (NOT NULL)
|
||||||
}
|
)
|
||||||
|
|
||||||
Table: illustrator {
|
|
||||||
illustrator_id: int (primary key, NOT NULL, UNIQUE, CHECK(illustrator_id > 0))
|
|
||||||
illustrator_name: Text (NOT NULL, UNIQUE)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table: element_type {
|
|
||||||
element_type_id: int (primary key, NOT NULL, UNIQUE, CHECK(element_type_id > 0))
|
|
||||||
element_type_name: Text (NOT NULL, UNIQUE)
|
|
||||||
}
|
|
||||||
|
|
||||||
Table: card_set {
|
Table: card_set {
|
||||||
set_id: int (primary key, NOT NULL, UNIQUE, CHECK(set_id > 0))
|
set_id: int (primary key, NOT NULL, UNIQUE, CHECK(set_id > 0))
|
||||||
set_name: Text (NOT NULL, UNIQUE)
|
set_name: Text (NOT NULL, UNIQUE)
|
||||||
@@ -30,4 +20,18 @@ Table: attack {
|
|||||||
attack_name: Text (NOT NULL)
|
attack_name: Text (NOT NULL)
|
||||||
attack_base_damage: int (NOT NULL, CHECK(attack_base_damage >= 0))
|
attack_base_damage: int (NOT NULL, CHECK(attack_base_damage >= 0))
|
||||||
attack_damage_modifier: Text (CHECK(attack_dam_modifier in ["+", "x"])) attack_card_id: int (NOT NULL)
|
attack_damage_modifier: Text (CHECK(attack_dam_modifier in ["+", "x"])) attack_card_id: int (NOT NULL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Table: element_type {
|
||||||
|
element_type_id: int (primary key, NOT NULL, UNIQUE, CHECK(element_type_id > 0))
|
||||||
|
element_type_name: Text (NOT NULL, UNIQUE)
|
||||||
|
}
|
||||||
|
|
||||||
|
Table: illustrator {
|
||||||
|
illustrator_id: int (primary key, NOT NULL, UNIQUE, CHECK(illustrator_id > 0))
|
||||||
|
illustrator_name: Text (NOT NULL, UNIQUE)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user