Added option for promotional emails to signup page
This commit is contained in:
@@ -25,6 +25,7 @@ CREATE TABLE IF NOT EXISTS signups (
|
||||
username VARCHAR(100) UNIQUE,
|
||||
salt VARCHAR(50),
|
||||
hash VARCHAR(100),
|
||||
promotions BOOLEAN DEFAULT FALSE,
|
||||
|
||||
verify INTEGER DEFAULT 0
|
||||
);
|
||||
@@ -37,6 +38,7 @@ CREATE TABLE IF NOT EXISTS accounts (
|
||||
username VARCHAR(100) UNIQUE,
|
||||
salt VARCHAR(50),
|
||||
hash VARCHAR(100),
|
||||
promotions BOOLEAN DEFAULT FALSE,
|
||||
|
||||
lastActivityTime TIMESTAMP DEFAULT '2019-01-01 00:00:00'
|
||||
);
|
||||
|
||||
+12
-16
@@ -1,20 +1,16 @@
|
||||
#NOTE: ALWAYS, ALWAYS, ALWAYS write a script in revert.sql that undoes these changes
|
||||
ALTER TABLE
|
||||
signups
|
||||
ADD COLUMN
|
||||
promotions BOOLEAN DEFAULT FALSE
|
||||
AFTER
|
||||
hash
|
||||
;
|
||||
|
||||
ALTER TABLE
|
||||
pastSpying
|
||||
MODIFY COLUMN
|
||||
success ENUM ('success', 'failure', 'ineffective')
|
||||
;
|
||||
|
||||
UPDATE
|
||||
pastSpying
|
||||
SET
|
||||
success = 'ineffective'
|
||||
WHERE
|
||||
success = 'success'
|
||||
AND
|
||||
spoilsGold = 0
|
||||
AND
|
||||
(SELECT COUNT(*) FROM equipmentStolen WHERE pastSpyingId = pastSpying.id) = 0
|
||||
accounts
|
||||
ADD COLUMN
|
||||
promotions BOOLEAN DEFAULT FALSE
|
||||
AFTER
|
||||
hash
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user