improvements

This commit is contained in:
2026-09-07 14:05:38 +03:00
parent acb72351f7
commit 27083475b1
@@ -11,7 +11,6 @@ Table card {
card_retreat_cost integer [not null, check: `card_retreat_cost >= 0`] card_retreat_cost integer [not null, check: `card_retreat_cost >= 0`]
card_release_date date [not null] card_release_date date [not null]
card_set_id integer [not null] card_set_id integer [not null]
attack_id integer [not null]
element_type_id integer [not null] element_type_id integer [not null]
illustrator_id integer [not null] illustrator_id integer [not null]
} }
@@ -46,6 +45,10 @@ Table attack_card {
attack_card_id int [pk, not null, unique] attack_card_id int [pk, not null, unique]
card_id int [not null] card_id int [not null]
attack_id int [not null] attack_id int [not null]
indexes {
(card_id, attack_id) [unique]
}
} }
Table attack_card_pricing { Table attack_card_pricing {
@@ -53,14 +56,17 @@ Table attack_card_pricing {
attack_card_pricing_cost int [not null, check: `attack_card_pricing_cost >= 0`] attack_card_pricing_cost int [not null, check: `attack_card_pricing_cost >= 0`]
attack_card_id int [not null] attack_card_id int [not null]
element_type_id int [not null] element_type_id int [not null]
indexes {
(attack_card_id, element_type_id) [unique]
}
} }
Ref: card_set.card_set_id < card.card_set_id Ref: card_set.card_set_id < card.card_set_id
Ref: attack.attack_id < card.attack_id
Ref: element_type.element_type_id < card.element_type_id Ref: element_type.element_type_id < card.element_type_id
Ref: illustrator.illustrator_id < card.illustrator_id Ref: illustrator.illustrator_id < card.illustrator_id
Ref: card.card_id > attack_card.card_id Ref: card.card_id < attack_card.card_id
Ref: attack.attack_id > attack_card.attack_id Ref: attack.attack_id > attack_card.attack_id
Ref: attack_card_pricing.attack_card_id < attack_card.attack_card_id Ref: attack_card_pricing.attack_card_id < attack_card.attack_card_id
Ref: element_type.element_type_id < attack_card_pricing.element_type_id Ref: element_type.element_type_id < attack_card_pricing.element_type_id