Add duel table migration for game mechanics
This commit is contained in:
parent
c59edbcf4f
commit
29efddbb51
1 changed files with 33 additions and 0 deletions
33
migrations/0007_duelv1.sql
Normal file
33
migrations/0007_duelv1.sql
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
Kemoverse - a gacha-style bot for the Fediverse.
|
||||||
|
Copyright © 2025 Waifu
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see https://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
CREATE TABLE duel (
|
||||||
|
duel_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
player_1_id INTEGER NOT NULL,
|
||||||
|
player_2_id INTEGER NOT NULL,
|
||||||
|
attacker_id INTEGER,
|
||||||
|
player_1_cards TEXT NOT NULL DEFAULT '[]',
|
||||||
|
player_2_cards TEXT NOT NULL DEFAULT '[]',
|
||||||
|
graveyard_p1 TEXT NOT NULL DEFAULT '[]',
|
||||||
|
graveyard_p2 TEXT NOT NULL DEFAULT '[]',
|
||||||
|
round INTEGER NOT NULL DEFAULT 1,
|
||||||
|
competitive BOOLEAN NOT NULL DEFAULT 0,
|
||||||
|
last_round_dt TEXT,
|
||||||
|
is_finished BOOLEAN NOT NULL DEFAULT 0,
|
||||||
|
points INTEGER NOT NULL DEFAULT 0,
|
||||||
|
winner_id INTEGER
|
||||||
|
);
|
Loading…
Add table
Reference in a new issue