feat: implement project settings management with CRUD operations and caching

This commit is contained in:
lborv
2025-10-13 20:40:01 +03:00
parent aa7920384c
commit 93f12cd1d8
14 changed files with 304 additions and 17 deletions

View File

@ -0,0 +1,21 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class ProjectSettings1760377023483 implements MigrationInterface {
name = "ProjectSettings1760377023483";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE \`projectSetting\` (\`id\` varchar(36) NOT NULL, \`key\` varchar(255) NOT NULL, \`value\` text NOT NULL, \`projectId\` varchar(36) NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`
);
await queryRunner.query(
`ALTER TABLE \`projectSetting\` ADD CONSTRAINT \`FK_8dfaf9c1ebbadb7af024e72e871\` FOREIGN KEY (\`projectId\`) REFERENCES \`project\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE \`projectSetting\` DROP FOREIGN KEY \`FK_8dfaf9c1ebbadb7af024e72e871\``
);
await queryRunner.query(`DROP TABLE \`projectSetting\``);
}
}