Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {MigrationInterface, QueryRunner} from "typeorm";
- export class CreateUserTable1563346816726 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`CREATE TABLE "user" ("id" SERIAL NOT NULL, "email" character varying NOT NULL, "username" character varying NOT NULL, "displayName" character varying, CONSTRAINT "UQ_e12875dfb3b1d92d7d7c5377e22" UNIQUE ("email"), CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb" UNIQUE ("username"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`);
- }
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`DROP TABLE "user"`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement