Commit Diff
Diff:
96889518ab78b1eb1c54e72c55c856cf3b22a8a0
1fa47b0a3fb52258ba2004152c826c448ed30774
Commit:
1fa47b0a3fb52258ba2004152c826c448ed30774
Tree:
7eab4dca17e25753fb88a55374128d09fcd7df41
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Thu Jun 22 14:14:13 2023 UTC
Message:
Auto generate ISO dates, patch thanks to xfnw and IanJ
blob - 1b71f51716513895246584983f3f511ae6d299a2
blob + d12207032804071768ac0dd95ce20073505207f9
--- table.sql
+++ table.sql
@@ -7,7 +7,8 @@ CREATE TABLE bnc (
username VARCHAR(32),
email VARCHAR(100),
password VARCHAR(100),
- localtime VARCHAR(100),
+ localtime INTEGER DEFAULT (unixepoch()),
+ datetime VARCHAR(25) AS (datetime(localtime, 'unixepoch')),
captcha INTEGER
);
CREATE TABLE shell (
@@ -19,7 +20,8 @@ CREATE TABLE shell (
username VARCHAR(32),
email VARCHAR(100),
password VARCHAR(100),
- localtime VARCHAR(100),
+ localtime INTEGER DEFAULT (unixepoch()),
+ datetime VARCHAR(25) AS (datetime(localtime, 'unixepoch')),
captcha INTEGER
);
CREATE TABLE mail (
@@ -31,7 +33,8 @@ CREATE TABLE mail (
username VARCHAR(32),
email VARCHAR(100),
password VARCHAR(100),
- localtime VARCHAR(100),
+ localtime INTEGER DEFAULT (unixepoch()),
+ datetime VARCHAR(25) AS (datetime(localtime, 'unixepoch')),
captcha INTEGER
);
CREATE TABLE www (
@@ -73,7 +76,8 @@ CREATE TABLE irc (
identified INTEGER,
ctcpversion VARCHAR(100),
ctcptime VARCHAR(100),
- localtime VARCHAR(100),
+ localtime INTEGER DEFAULT (unixepoch()),
+ datetime VARCHAR(25) AS (datetime(localtime, 'unixepoch')),
oper INTEGER,
idle INTEGER,
ssl INTEGER,
IRCNow