Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3501940
D5883.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5883.diff
View Options
diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js
--- a/keyserver/src/database/migration-config.js
+++ b/keyserver/src/database/migration-config.js
@@ -117,6 +117,18 @@
`);
},
],
+ [
+ 12,
+ async () => {
+ await dbQuery(SQL`
+ CREATE TABLE IF NOT EXISTS siwe_nonces (
+ nonce char(17) NOT NULL,
+ creation_time bigint(20) NOT NULL,
+ PRIMARY KEY (nonce)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ `);
+ },
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());
diff --git a/keyserver/src/database/setup-db.js b/keyserver/src/database/setup-db.js
--- a/keyserver/src/database/setup-db.js
+++ b/keyserver/src/database/setup-db.js
@@ -241,6 +241,11 @@
confirmed tinyint(1) UNSIGNED NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ CREATE TABLE siwe_nonces (
+ nonce char(17) NOT NULL,
+ creation_time bigint(20) NOT NULL,
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
ALTER TABLE cookies
ADD PRIMARY KEY (id),
ADD UNIQUE KEY device_token (device_token),
@@ -353,6 +358,9 @@
ALTER TABLE policy_acknowledgments
ADD PRIMARY KEY (user, policy);
+
+ ALTER TABLE siwe_nonces
+ ADD PRIMARY KEY (nonce);
`,
{ multipleStatements: true },
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 3:52 AM (18 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685490
Default Alt Text
D5883.diff (1 KB)
Attached To
Mode
D5883: [keyserver] Introduce `siwe_nonces` table
Attached
Detach File
Event Timeline
Log In to Comment