mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 15:13:05 +00:00
create tags
This commit is contained in:
1 parent
9e5976a4d5
commit
c26b0f3a4c
7 files changed
+112
-2
No files matched your search
@@ -593,6 +593,9 @@ export class Channel extends BaseClass {
|
||||
isThread() {
|
||||
return this.type === ChannelType.GUILD_NEWS_THREAD || this.type === ChannelType.GUILD_PUBLIC_THREAD || this.type === ChannelType.GUILD_PRIVATE_THREAD;
|
||||
}
|
||||
isForum() {
|
||||
return this.type === ChannelType.GUILD_FORUM || this.type === ChannelType.GUILD_MEDIA;
|
||||
}
|
||||
|
||||
isPrivateThread() {
|
||||
return this.type === ChannelType.GUILD_PRIVATE_THREAD;
|
||||
|
||||
@@ -39,10 +39,10 @@ export class Tag extends BaseClass {
|
||||
@Column()
|
||||
moderated: boolean = false;
|
||||
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
emoji_id?: string;
|
||||
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
emoji_name?: string;
|
||||
|
||||
toJSON() {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class NullableTags1770310028511 implements MigrationInterface {
|
||||
name = "NullableTags1770310028511";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_id" DROP NOT NULL`);
|
||||
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_name" DROP NOT NULL`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_name" SET NOT NULL`);
|
||||
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_id" SET NOT NULL`);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user