Skip to content

Commit e4f05db

Browse files
committed
feat: adds migration file for unique index
1 parent 0d61638 commit e4f05db

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CREATE UNIQUE INDEX IF NOT EXISTS note_teams_note_id_user_id_unique_idx
2+
ON public.note_teams (note_id, user_id);

src/repository/storage/postgres/orm/sequelize/teams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class TeamsSequelizeStorage {
107107
// Create a unique index on noteId and userId
108108
{
109109
unique: true,
110-
fields: ['noteId', 'userId'],
110+
fields: ['note_id', 'user_id'],
111111
},
112112
],
113113
});

0 commit comments

Comments
 (0)