Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
Fix migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
mklkj committed Jan 28, 2024
1 parent dfa2997 commit 2e4ac38
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ALTER TABLE chatparticipants RENAME TO chat_participants;
ALTER TABLE chat_participants RENAME COLUMN "chatId" TO chat_id;
ALTER TABLE chat_participants RENAME COLUMN "userId" TO user_id;
ALTER TABLE chat_participants RENAME COLUMN "customName" TO custom_name;

ALTER TABLE chats RENAME COLUMN "customName" TO custom_name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ALTER TABLE chat_participants DROP CONSTRAINT pk_chatparticipants;
ALTER TABLE chat_participants ADD user_id uuid, ADD CONSTRAINT pk_chat_participants PRIMARY KEY (chat_id, user_id);
ALTER TABLE chat_participants ADD CONSTRAINT pk_chat_participants PRIMARY KEY (chat_id, user_id);
ALTER TABLE chat_participants ADD CONSTRAINT participants_unique UNIQUE (chat_id, user_id);

0 comments on commit 2e4ac38

Please sign in to comment.