Skip to content

Commit

Permalink
feat: add task description bodies (#79)
Browse files Browse the repository at this point in the history
* feat: add task description bodies

* chore: fix indent
  • Loading branch information
LeonVreling authored Aug 1, 2020
1 parent 246f41f commit d45b63d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migrations/20200720134741-add-task-description-body.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
up: (queryInterface, Sequelize) => queryInterface.addColumn(
'bodies',
'task_description',
{
type: Sequelize.TEXT,
allowNull: true
},
),
down: (queryInterface) => queryInterface.removeColumn('bodies', 'task_description')
};
5 changes: 5 additions & 0 deletions models/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const Body = sequelize.define('body', {
notEmpty: { msg: 'Description should be set.' },
}
},
task_description: {
type: Sequelize.TEXT,
allowNull: true,
defaultValue: ''
},
code: {
type: Sequelize.STRING,
allowNull: false,
Expand Down

0 comments on commit d45b63d

Please sign in to comment.