Skip to content

Commit 719b6d4

Browse files
created a migration for created by
1 parent cef7896 commit 719b6d4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { DataTypes } from 'sequelize'
2+
3+
import { Migration } from '../connection'
4+
5+
export const up: Migration = async ({ context: queryInterface }) => {
6+
await queryInterface.addColumn('responsibilities', 'created_by_user_id', {
7+
type: DataTypes.STRING,
8+
allowNull: true,
9+
defaultValue: null,
10+
})
11+
}
12+
13+
export const down: Migration = async ({ context: queryInterface }) => {
14+
await queryInterface.removeColumn('responsibilities','created_by_user_id')
15+
}

0 commit comments

Comments
 (0)