28 lines
842 B
JavaScript
28 lines
842 B
JavaScript
export class Init1690040643986 {
|
|
name = "Init1690040643986";
|
|
|
|
async up(queryRunner) {
|
|
await queryRunner.query(`
|
|
CREATE TABLE "account" (
|
|
"id" bigint NOT NULL,
|
|
"username" text NOT NULL,
|
|
"email" text NOT NULL,
|
|
"password" text NOT NULL,
|
|
CONSTRAINT "UQ_4c8f96ccf523e9a3faefd5bdd4c" UNIQUE ("email"),
|
|
CONSTRAINT "PK_54115ee388cdb6d86bb4bf5b2ea" PRIMARY KEY ("id")
|
|
)
|
|
`);
|
|
await queryRunner.query(`
|
|
CREATE UNIQUE INDEX "IDX_41dfcb70af895ddf9a53094515" ON "account" ("username")
|
|
`);
|
|
}
|
|
|
|
async down(queryRunner) {
|
|
await queryRunner.query(`
|
|
DROP INDEX "public"."IDX_41dfcb70af895ddf9a53094515"
|
|
`);
|
|
await queryRunner.query(`
|
|
DROP TABLE "account"
|
|
`);
|
|
}
|
|
}
|