Add course_unit_type to course-model

This commit is contained in:
Saara Satokangas
2021-12-08 14:02:51 +02:00
parent dcb20e64b6
commit 657b6f6b64
3 changed files with 18 additions and 0 deletions
+3
View File
@@ -47,6 +47,9 @@ Course.init(
substitutions: {
type: JSONB,
},
course_unit_type: {
type: STRING,
},
},
{
underscored: false,
@@ -0,0 +1,12 @@
const { STRING } = require('sequelize')
module.exports = {
up: async queryInterface => {
await queryInterface.addColumn('course', 'course_unit_type', {
type: STRING,
})
},
down: async queryInterface => {
await queryInterface.deleteColumn('course', 'course_unit_type')
},
}
@@ -47,6 +47,9 @@ Course.init(
substitutions: {
type: JSONB,
},
course_unit_type: {
type: STRING,
},
},
{
underscored: false,