diff --git a/backend/src/database/migrations/20240507184134-add-identifier-to-users.ts b/backend/src/database/migrations/20240507184134-add-identifier-to-users.ts new file mode 100644 index 0000000..7a783dc --- /dev/null +++ b/backend/src/database/migrations/20240507184134-add-identifier-to-users.ts @@ -0,0 +1,14 @@ +import { QueryInterface, DataTypes } from "sequelize"; + +module.exports = { + up: (queryInterface: QueryInterface) => { + return queryInterface.addColumn("Users", "identifier", { + type: DataTypes.STRING, + allowNull: true + }); + }, + + down: (queryInterface: QueryInterface) => { + return queryInterface.removeColumn("Users", "identifier"); + } +}; \ No newline at end of file diff --git a/backend/src/models/User.ts b/backend/src/models/User.ts index a7e3d47..1be891d 100644 --- a/backend/src/models/User.ts +++ b/backend/src/models/User.ts @@ -51,6 +51,9 @@ class User extends Model { @Column transferToOtherQueues: boolean; + @Column + identifier: string; + @Default("admin") @Column profile: string;