mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-16 17:45:28 +10:00
29 lines
1.3 KiB
JavaScript
29 lines
1.3 KiB
JavaScript
/**
|
|
* @typedef {import('typeorm').MigrationInterface} MigrationInterface
|
|
* @typedef {import('typeorm').QueryRunner} QueryRunner
|
|
*/
|
|
|
|
/**
|
|
* @class
|
|
* @implements {MigrationInterface}
|
|
*/
|
|
module.exports = class Update1772387168207 {
|
|
name = 'Update1772387168207'
|
|
|
|
/**
|
|
* @param {QueryRunner} queryRunner
|
|
*/
|
|
async up(queryRunner) {
|
|
await queryRunner.query(`CREATE TABLE "systems" ("id" SERIAL NOT NULL, "userid" character varying NOT NULL, "fronter" character varying NOT NULL, "grouptag" character varying NOT NULL, "autoproxy" boolean NOT NULL, "createdAt" TIMESTAMP NOT NULL, "updatedAt" TIMESTAMP NOT NULL, CONSTRAINT "PK_aec3139aedeb09c5ae27f2c94d3" PRIMARY KEY ("id"))`);
|
|
await queryRunner.query(`CREATE TABLE "members" ("id" SERIAL NOT NULL, "userid" character varying NOT NULL, "name" character varying(100) NOT NULL, "displayname" integer, "proxy" integer, "propic" integer, "createdAt" TIMESTAMP NOT NULL, "updatedAt" TIMESTAMP NOT NULL, "systemid" character varying NOT NULL, CONSTRAINT "PK_28b53062261b996d9c99fa12404" PRIMARY KEY ("id"))`);
|
|
}
|
|
|
|
/**
|
|
* @param {QueryRunner} queryRunner
|
|
*/
|
|
async down(queryRunner) {
|
|
await queryRunner.query(`DROP TABLE "members"`);
|
|
await queryRunner.query(`DROP TABLE "systems"`);
|
|
}
|
|
}
|