mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
a821e37028
* Refactor workspace membership system * Create setup endpoint * Use Passport.js * Several updates and fixes
17 lines
713 B
TypeScript
17 lines
713 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class SpaceSlug1710615517137 implements MigrationInterface {
|
|
name = 'SpaceSlug1710615517137'
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "spaces" ADD "slug" character varying`);
|
|
await queryRunner.query(`ALTER TABLE "spaces" ADD CONSTRAINT "UQ_c58549749e7a141746940d01f39" UNIQUE ("slug", "workspaceId")`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "spaces" DROP CONSTRAINT "UQ_c58549749e7a141746940d01f39"`);
|
|
await queryRunner.query(`ALTER TABLE "spaces" DROP COLUMN "slug"`);
|
|
}
|
|
|
|
}
|