fix(server): マイグレーションad1676438468213が通らないのを修正 (#9963)
* fix(server): マイグレーションad1676438468213が通らないのを修正 Fix #9962 * fix
This commit is contained in:
parent
839a626716
commit
4db787c4ee
2 changed files with 2 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
export class ad1676438468213 {
|
export class ad1676438468213 {
|
||||||
name = 'ad1676438468213';
|
name = 'ad1676438468213';
|
||||||
async up(queryRunner) {
|
async up(queryRunner) {
|
||||||
await queryRunner.query(`ALTER TABLE "ad" ADD "startsAt" TIMESTAMP WITH TIME ZONE NOT NULL`);
|
await queryRunner.query(`ALTER TABLE "ad" ADD "startsAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()`);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner) {
|
||||||
await queryRunner.query(`ALTER TABLE "role" DROP COLUMN "startsAt"`);
|
await queryRunner.query(`ALTER TABLE "role" DROP COLUMN "startsAt"`);
|
||||||
|
|
|
@ -21,6 +21,7 @@ export class Ad {
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column('timestamp with time zone', {
|
||||||
comment: 'The expired date of the Ad.',
|
comment: 'The expired date of the Ad.',
|
||||||
|
default: () => 'now()',
|
||||||
})
|
})
|
||||||
public startsAt: Date;
|
public startsAt: Date;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue