Fix db migrations (#212)
This commit is contained in:
parent
eb033a4174
commit
a377777b12
2 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ exports.up = function (next) {
|
|||
db.addColumn('customers', 'authorized_at', 'timestamptz'),
|
||||
db.addColumn('customers', 'sanctions_check_at', 'timestamptz'),
|
||||
|
||||
db.renameColumn('compliance_authorizations', 'name', 'compliance_overrides'),
|
||||
'alter table compliance_authorizations rename to compliance_overrides',
|
||||
db.addColumn('compliance_overrides', 'verification', 'verification_type not null'),
|
||||
db.renameColumn('compliance_overrides', 'authorized_at', 'override_at'),
|
||||
db.renameColumn('compliance_overrides', 'authorized_by', 'override_by')
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ function dropColumn (table, column) {
|
|||
|
||||
function renameColumn (table, column, newName) {
|
||||
return ifColumn(table, column,
|
||||
ifColumn(table, column, `
|
||||
ifColumn(table, newName, `
|
||||
ALTER TABLE ${table}
|
||||
RENAME ${column} to ${newName}`, true, true))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue