Viewing profiles works, profiles not yet created
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# account system
|
||||
CREATE TABLE IF NOT EXISTS signups (
|
||||
email VARCHAR(320) UNIQUE,
|
||||
username VARCHAR(100) UNIQUE,
|
||||
@@ -34,5 +35,21 @@ CREATE TABLE IF NOT EXISTS passwordRecover (
|
||||
accountId INTEGER UNSIGNED UNIQUE,
|
||||
token INTEGER DEFAULT 0,
|
||||
|
||||
CONSTRAINT FOREIGN KEY fk_accountId(accountId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
|
||||
#profile system
|
||||
CREATE TABLE IF NOT EXISTS profiles (
|
||||
id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY UNIQUE,
|
||||
td TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
|
||||
|
||||
accountId INTEGER UNSIGNED UNIQUE,
|
||||
|
||||
gold INTEGER DEFAULT 0,
|
||||
recruits INTEGER DEFAULT 0,
|
||||
soldiers INTEGER DEFAULT 0,
|
||||
spies INTEGER DEFAULT 0,
|
||||
scientists INTEGER DEFAULT 0,
|
||||
|
||||
CONSTRAINT FOREIGN KEY fk_accountId(accountId) REFERENCES accounts(id) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
);
|
||||
@@ -1,4 +1,5 @@
|
||||
DROP TABLE signups;
|
||||
DROP TABLE accounts;
|
||||
DROP TABLE sessions;
|
||||
#DROP TABLE profiles;
|
||||
DROP TABLE passwordRecover;
|
||||
DROP TABLE profiles;
|
||||
|
||||
Reference in New Issue
Block a user