Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherJMiller committed Dec 19, 2023
1 parent 9b205a7 commit 7fb08ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

yarn typeorm migration:run -- -d migration.config.mjs
yarn typeorm migration:run -d migration.config.mjs
6 changes: 4 additions & 2 deletions api/migrations/1702967173044-UpdateUserID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateUserID1702967173044 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE user ALTER COLUMN id TYPE VARCHAR;`);
await queryRunner.query(
`ALTER TABLE "user" ALTER COLUMN "id" TYPE VARCHAR;`,
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE user ALTER COLUMN id TYPE INT;`);
await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "id" TYPE INT;`);
}
}

0 comments on commit 7fb08ec

Please sign in to comment.