Skip to content

Commit 2cbbcd6

Browse files
Merge pull request #98 from CAMAP-APP/hot/migration
fix db migration
2 parents 218273d + fde275c commit 2cbbcd6

2 files changed

Lines changed: 14 additions & 18 deletions

File tree

packages/api-core/src/migrations/1773758907826-EmailDigests.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {MigrationInterface, QueryRunner} from "typeorm";
2+
3+
export class EmailDigests1773912252829 implements MigrationInterface {
4+
name = 'EmailDigests1773912252829'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`CREATE TABLE \`NotificationMail\` (\`id\` int NOT NULL AUTO_INCREMENT, \`cdate\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`htmlBody\` mediumtext NULL, \`textBody\` mediumtext NULL, \`digest\` int NOT NULL, \`subject\` varchar(256) NOT NULL, \`groupId\` int NOT NULL, \`recipientId\` int NOT NULL, \`attachments\` mediumtext NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
8+
}
9+
10+
public async down(queryRunner: QueryRunner): Promise<void> {
11+
await queryRunner.query(`DROP TABLE \`NotificationMail\``);
12+
}
13+
14+
}

0 commit comments

Comments
 (0)