sendou.ink/migrations/118-user-widget.js
Kalle 77978c450f
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run
New user page (#2812)
Co-authored-by: hfcRed <hfcred@gmx.net>
2026-02-16 19:26:57 +02:00

20 lines
472 B
JavaScript

export function up(db) {
db.transaction(() => {
db.prepare(
/* sql */ `
create table "UserWidget" (
"userId" integer not null,
"index" integer not null,
"widget" text not null,
primary key ("userId", "index"),
foreign key ("userId") references "User"("id") on delete cascade
) strict
`,
).run();
db.prepare(
/* sql */ `create index user_widget_user_id on "UserWidget"("userId")`,
).run();
})();
}