Files
DarkflameServer/migrations/dlu/mysql/30_account_email.sql
Aaron Kimbrell 2d1ef0e370 feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch:
accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy
reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live
events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved
captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes
they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 09:33:10 -05:00

15 lines
802 B
SQL

/* Account email for password resets. email/email_confirmed_at match NexusDashboard's columns so existing data is kept,
statements for columns that already exist fail individually and are skipped. */
ALTER TABLE accounts ADD COLUMN email VARCHAR(255) NULL DEFAULT '';
ALTER TABLE accounts ADD COLUMN email_confirmed_at DATETIME NULL DEFAULT NULL;
/* Sessions issued before this unix time are rejected, e.g. after a password reset */
ALTER TABLE accounts ADD COLUMN sessions_valid_after BIGINT NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS account_tokens (
token_hash CHAR(64) NOT NULL PRIMARY KEY,
account_id INT NOT NULL,
purpose VARCHAR(16) NOT NULL,
data VARCHAR(255) NOT NULL DEFAULT '',
expires_at BIGINT NOT NULL,
INDEX account_tokens_account (account_id, purpose)
);