mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-20 06:01:03 -05:00
* Initial * CSS lint * Test CI * Add 1v1, 2v2, and 3v3 Tags (#1771) * Initial * CSS lint * Test CI * Rename step --------- Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
24 lines
607 B
JavaScript
24 lines
607 B
JavaScript
export function up(db) {
|
|
db.prepare(
|
|
`
|
|
create table "UserWeapon" (
|
|
"userId" integer not null,
|
|
"weaponSplId" integer not null,
|
|
"order" integer not null,
|
|
"createdAt" integer default (strftime('%s', 'now')) not null,
|
|
unique("userId", "weaponSplId") on conflict rollback,
|
|
unique("userId", "order") on conflict rollback,
|
|
foreign key ("userId") references "User"("id") on delete restrict
|
|
) strict
|
|
`,
|
|
).run();
|
|
|
|
db.prepare(
|
|
`create index user_weapon_user_id on "UserWeapon"("userId")`,
|
|
).run();
|
|
}
|
|
|
|
export function down(db) {
|
|
db.prepare(`drop table "UserWeapon"`).run();
|
|
}
|