Attacks are now pending
This commit is contained in:
@@ -54,4 +54,42 @@ CREATE TABLE IF NOT EXISTS profiles (
|
||||
lastRecruitTime TIMESTAMP DEFAULT '2019-01-01 00:00:00',
|
||||
|
||||
CONSTRAINT FOREIGN KEY fk_accountId(accountId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
|
||||
#combat system
|
||||
CREATE TABLE IF NOT EXISTS pendingCombat (
|
||||
id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY UNIQUE,
|
||||
td TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
|
||||
|
||||
eventTime TIMESTAMP,
|
||||
|
||||
attackerId INTEGER UNSIGNED,
|
||||
defenderId INTEGER UNSIGNED,
|
||||
attackingUnits INTEGER UNSIGNED,
|
||||
|
||||
CONSTRAINT FOREIGN KEY fk_attackerId(attackerId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT FOREIGN KEY fk_defenderId(defenderId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS pastCombat (
|
||||
id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY UNIQUE,
|
||||
td TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
|
||||
|
||||
eventTime TIMESTAMP,
|
||||
|
||||
attackerId INTEGER UNSIGNED,
|
||||
defenderId INTEGER UNSIGNED,
|
||||
attackingUnits INTEGER UNSIGNED,
|
||||
defindingUnits INTEGER UNSIGNED,
|
||||
|
||||
undefended BOOLEAN,
|
||||
|
||||
victor ENUM ('attacker', 'defender'),
|
||||
|
||||
spoilsGold INTEGER,
|
||||
|
||||
casualtiesVictor INTEGER,
|
||||
|
||||
CONSTRAINT FOREIGN KEY fk_attackerId(attackerId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT FOREIGN KEY fk_defenderId(defenderId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user