diff --git a/src/infrastructure/migrations/1720783675512-migration.ts b/src/infrastructure/migrations/1720783675512-migration.ts deleted file mode 100644 index 75834b0..0000000 --- a/src/infrastructure/migrations/1720783675512-migration.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; - -export class Migration1720783675512 implements MigrationInterface { - name = 'Migration1720783675512' - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "images" DROP NOT NULL`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "images" SET NOT NULL`); - } - -} diff --git a/src/infrastructure/migrations/1720784072178-migration.ts b/src/infrastructure/migrations/1720784072178-migration.ts deleted file mode 100644 index 1664823..0000000 --- a/src/infrastructure/migrations/1720784072178-migration.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; - -export class Migration1720784072178 implements MigrationInterface { - name = 'Migration1720784072178' - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "images"`); - await queryRunner.query(`ALTER TABLE "user" ADD "images" character varying`); - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "images"`); - await queryRunner.query(`ALTER TABLE "user" ADD "images" text array`); - } - -} diff --git a/src/infrastructure/migrations/1720782119274-migration.ts b/src/infrastructure/migrations/1721905386635-migration.ts similarity index 65% rename from src/infrastructure/migrations/1720782119274-migration.ts rename to src/infrastructure/migrations/1721905386635-migration.ts index 98ba0df..aeca6d6 100644 --- a/src/infrastructure/migrations/1720782119274-migration.ts +++ b/src/infrastructure/migrations/1721905386635-migration.ts @@ -1,10 +1,10 @@ import { MigrationInterface, QueryRunner } from "typeorm"; -export class Migration1720782119274 implements MigrationInterface { - name = 'Migration1720782119274' +export class Migration1721905386635 implements MigrationInterface { + name = 'Migration1721905386635' public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`CREATE TABLE "user" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT ('now'::text)::timestamp(6) with time zone, "updatedAt" TIMESTAMP NOT NULL DEFAULT ('now'::text)::timestamp(6) with time zone, "email" character varying NOT NULL, "images" text array NOT NULL, CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`); + await queryRunner.query(`CREATE TABLE "user" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT ('now'::text)::timestamp(6) with time zone, "updatedAt" TIMESTAMP NOT NULL DEFAULT ('now'::text)::timestamp(6) with time zone, "email" character varying NOT NULL, "images" character varying, CONSTRAINT "UQ_e12875dfb3b1d92d7d7c5377e22" UNIQUE ("email"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`); } public async down(queryRunner: QueryRunner): Promise {