Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fix command line options, refactor MigrationExecutor.executePen…
…dingMigrations and fix tests
- Loading branch information
Showing
9 changed files
with
117 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {PrimaryGeneratedColumn} from "../../../../src/decorator/columns/PrimaryGeneratedColumn"; | ||
import {Entity} from "../../../../src/decorator/entity/Entity"; | ||
|
||
@Entity({name: "users", synchronize: false}) | ||
export class User { | ||
@PrimaryGeneratedColumn("uuid") | ||
id: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tion/1543844606093-CreateUuidExtension.ts → ...tion/0000000000001-CreateUuidExtension.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/github-issues/2693/migration/0000000000003-InsertUser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { MigrationInterface } from "../../../../src/migration/MigrationInterface"; | ||
import { QueryRunner } from "../../../../src/query-runner/QueryRunner"; | ||
import { User } from "../entity/user"; | ||
|
||
export class InsertUser0000000000003 implements MigrationInterface { | ||
public up(queryRunner: QueryRunner): Promise<any> { | ||
const userRepo = queryRunner.connection.getRepository<User>(User); | ||
return userRepo.save(new User()); | ||
} | ||
|
||
public down(queryRunner: QueryRunner): Promise<any> { | ||
return Promise.resolve(); | ||
} | ||
} |