Skip to content

Commit

Permalink
feat(wp): add wp api snapshot migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mlbrgl committed Feb 7, 2024
1 parent 83c8974 commit 64fe502
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions db/migration/1706711579844-AddWordpressApiSnapshotToPosts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class AddWordpressApiSnapshotToPosts1706711579844
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE posts ADD wpApiSnapshot JSON DEFAULT NULL`
)
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE posts DROP COLUMN wpApiSnapshot`)
}
}

0 comments on commit 64fe502

Please sign in to comment.