Newer
Older

Louis
committed
module.exports = {
up: (migration, Types) => {
return migration.createTable('user_bundle_codes', {
user_id: {
type: Types.UUID,
primaryKey: true,
references: {
model: 'users',
key: 'id',
},
onDelete: 'cascade',
onUpdate: 'cascade',
},
bundle_code_id: {
type: Types.UUID,
primaryKey: true,
references: {
model: 'bundle_codes',
key: 'id',
},
onDelete: 'cascade',
onUpdate: 'cascade',
},
})
},
down: (migration, Types) => {
return migration.dropTable('user_bundle_codes')
},
}