import { MigrationInterface , QueryRunner } from "typeorm" ; export class CreateUserTable1580263521268 implements MigrationInterface { readonly name = 'CreateUserTable1580263521268' ; public async up ( queryRunner ) { await queryRunner . query ( `CREATE TABLE "user" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "email" character varying NOT NULL, CONSTRAINT "UQ_e12875dfb3b1d92d7d7c5377e22" UNIQUE ("email"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))` , undefined ) ; } public async down ( queryRunner ) { await queryRunner . query ( `DROP TABLE "user"` , undefined ) ; } }