Skip to content

Commit

Permalink
Fix error with constaits
Browse files Browse the repository at this point in the history
  • Loading branch information
moiskillnadne committed Jan 14, 2025
1 parent 25836a9 commit 3998591
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/api/counter/contoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ route.post(
},
});
} catch (error) {
console.error(error);
return next(error);
}
},
Expand Down
9 changes: 2 additions & 7 deletions src/database/migrations/20250114130518-CounterEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = {
userId: {
type: Sequelize.UUIDV4,
allowNull: false,
unique: true,
unique: false,
references: {
model: 'user',
key: 'id',
Expand All @@ -53,11 +53,6 @@ module.exports = {
},

async down(queryInterface, Sequelize) {
/**
* Add reverting commands here.
*
* Example:
* await queryInterface.dropTable('users');
*/
await queryInterface.dropTable('counter');
},
};
2 changes: 1 addition & 1 deletion src/database/models/Counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const CounterEntity = Sequelize.define(
userId: {
type: DataTypes.UUIDV4,
allowNull: false,
unique: true,
unique: false,
references: {
model: User,
key: 'id',
Expand Down

0 comments on commit 3998591

Please sign in to comment.