@social.dev/server-sdk 0.0.1-alpha.64 → 0.0.1-alpha.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddChatReplies1762953835109 = void 0;
4
+ class AddChatReplies1762953835109 {
5
+ name = 'AddChatReplies1762953835109';
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "chat_message" ADD "replyToId" integer`);
8
+ await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_71d77a16df3f16e830d645f31f6"`);
9
+ await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "conversationId" SET NOT NULL`);
10
+ await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_71d77a16df3f16e830d645f31f6" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
11
+ await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_e87f74fc2f41b80635e686ec4fa" FOREIGN KEY ("replyToId") REFERENCES "chat_message"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
12
+ }
13
+ async down(queryRunner) {
14
+ await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_e87f74fc2f41b80635e686ec4fa"`);
15
+ await queryRunner.query(`ALTER TABLE "chat_message" DROP CONSTRAINT "FK_71d77a16df3f16e830d645f31f6"`);
16
+ await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "conversationId" DROP NOT NULL`);
17
+ await queryRunner.query(`ALTER TABLE "chat_message" ADD CONSTRAINT "FK_71d77a16df3f16e830d645f31f6" FOREIGN KEY ("conversationId") REFERENCES "chat_conversation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
18
+ await queryRunner.query(`ALTER TABLE "chat_message" DROP COLUMN "replyToId"`);
19
+ }
20
+ }
21
+ exports.AddChatReplies1762953835109 = AddChatReplies1762953835109;
22
+ //# sourceMappingURL=1762953835109-AddChatReplies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1762953835109-AddChatReplies.js","sourceRoot":"","sources":["../../src/migrations/1762953835109-AddChatReplies.ts"],"names":[],"mappings":";;;AAEA,MAAa,2BAA2B;IACtC,IAAI,GAAG,6BAA6B,CAAC;IAE9B,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CACrB,oDAAoD,CACrD,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6EAA6E,CAC9E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,uEAAuE,CACxE,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,sLAAsL,CACvL,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,8KAA8K,CAC/K,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CACrB,6EAA6E,CAC9E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6EAA6E,CAC9E,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,wEAAwE,CACzE,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,sLAAsL,CACvL,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,oDAAoD,CACrD,CAAC;IACJ,CAAC;CACF;AAtCD,kEAsCC"}