Skip to content

Commit

Permalink
Remove STARTED stage from the backend and database
Browse files Browse the repository at this point in the history
  • Loading branch information
Tereshchenko Aleksandr committed Aug 20, 2024
1 parent 2df4ec9 commit cdd98b2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { DataTypes, UUIDV4 } = require('sequelize')

module.exports = {
up: async queryInterface => {
// remove the 'started' option from the status column of theses table
await queryInterface.changeColumn('theses', 'status', {
type: DataTypes.ENUM,
values: ['PLANNING', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'],
allowNull: false,
})
},
down: async queryInterface => {
// add the 'started' option back to the status column of theses table
await queryInterface.changeColumn('theses', 'status', {
type: DataTypes.ENUM,
values: ['PLANNING', 'STARTED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'],
allowNull: false,
})
}
}
2 changes: 1 addition & 1 deletion src/server/db/models/Thesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Thesis.init(
},
status: {
type: DataTypes.ENUM,
values: ['PLANNING', 'STARTED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'],
values: ['PLANNING', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'],
allowNull: false,
},
startDate: {
Expand Down
1 change: 0 additions & 1 deletion src/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export interface RequestWithUser extends Request {

export type ThesisStatus =
| 'PLANNING'
| 'STARTED'
| 'IN_PROGRESS'
| 'COMPLETED'
| 'CANCELLED'
Expand Down

0 comments on commit cdd98b2

Please sign in to comment.