Skip to content

Commit

Permalink
fix: adds unique index on note and user id of teams table
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushar504 committed Feb 5, 2025
1 parent 27cc4a7 commit 0d61638
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/repository/storage/postgres/orm/sequelize/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export default class TeamsSequelizeStorage {
tableName: this.tableName,
sequelize: this.database,
timestamps: false,
indexes: [
// Create a unique index on noteId and userId
{
unique: true,
fields: ['noteId', 'userId'],
},
],
});
}

Expand Down

0 comments on commit 0d61638

Please sign in to comment.