feat: Add emoji and alot of other fixes

This commit is contained in:
2026-06-05 05:40:18 +02:00
parent ca069e2f61
commit 6865147e8f
72 changed files with 3885 additions and 413 deletions

View File

@@ -0,0 +1,27 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddCustomEmojis1000000000011 implements MigrationInterface {
name = 'AddCustomEmojis1000000000011';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "custom_emojis" (
"id" TEXT PRIMARY KEY NOT NULL,
"name" TEXT NOT NULL,
"creatorUserId" TEXT NOT NULL,
"dataUrl" TEXT NOT NULL,
"hash" TEXT NOT NULL,
"mime" TEXT NOT NULL,
"size" INTEGER NOT NULL,
"createdAt" INTEGER NOT NULL,
"updatedAt" INTEGER NOT NULL
)`);
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "idx_custom_emojis_updated_at" ON "custom_emojis" ("updatedAt")`);
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "idx_custom_emojis_creator" ON "custom_emojis" ("creatorUserId")`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP INDEX IF EXISTS "idx_custom_emojis_creator"`);
await queryRunner.query(`DROP INDEX IF EXISTS "idx_custom_emojis_updated_at"`);
await queryRunner.query(`DROP TABLE IF EXISTS "custom_emojis"`);
}
}