-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fa539f
commit dcd1e08
Showing
13 changed files
with
611 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...31128104925_save_each_conversation_as_a_new_entry_in_the_conversation_model/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `conversation` on the `Conversation` table. All the data in the column will be lost. | ||
- You are about to drop the column `status` on the `Conversation` table. All the data in the column will be lost. | ||
- Added the required column `message` to the `Conversation` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `role` to the `Conversation` table without a default value. This is not possible if the table is not empty. | ||
- Added the required column `type` to the `Conversation` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "Conversation" DROP COLUMN "conversation", | ||
DROP COLUMN "status", | ||
ADD COLUMN "message" TEXT NOT NULL, | ||
ADD COLUMN "previousConversationId" INTEGER, | ||
ADD COLUMN "replyToConversationId" INTEGER, | ||
ADD COLUMN "role" TEXT NOT NULL, | ||
ADD COLUMN "team_id" INTEGER, | ||
ADD COLUMN "team_name" TEXT, | ||
ADD COLUMN "team_status" TEXT, | ||
ADD COLUMN "type" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Conversation" ADD CONSTRAINT "Conversation_replyToConversationId_fkey" FOREIGN KEY ("replyToConversationId") REFERENCES "Conversation"("id") ON DELETE SET NULL ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Conversation" ADD CONSTRAINT "Conversation_previousConversationId_fkey" FOREIGN KEY ("previousConversationId") REFERENCES "Conversation"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
2 changes: 2 additions & 0 deletions
2
migrations/20231128124202_make_type_field_as_optional_in_conversation_model/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "Conversation" ALTER COLUMN "type" DROP NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.