sendou.ink/migrations/035-log-in-link.js
Kalle 4eaeb48136
Alternative login flow (magic link via bot) (#1488)
* Log in link creation initial

* Add global name to update all command

* Remove left over log

* Login command

* Update command

* Add todos

* TODOs

* Migration file fix order
2023-09-09 10:27:59 +03:00

13 lines
302 B
JavaScript

module.exports.up = function (db) {
db.prepare(
/*sql*/ `
create table "LogInLink" (
"code" text unique not null,
"expiresAt" integer not null,
"userId" integer not null,
foreign key ("userId") references "User"("id") on delete cascade
) strict
`,
).run();
};