aboutsummaryrefslogtreecommitdiffstats
path: root/db/migrations/20210714123455_data_fixes_merge.js
diff options
context:
space:
mode:
authorRan Guin <[email protected]>2021-07-28 16:25:07 -0700
committerAdam Soltys <[email protected]>2021-07-29 11:55:26 -0700
commitfc19ca29073fc4fc193af583dde6a9e15fa776ba (patch)
tree660eb581be06a1a29bb884ecc0c43b497cfb3a57 /db/migrations/20210714123455_data_fixes_merge.js
parent310b1c52620e64e89e0886c160db60b64dfd7429 (diff)
downloadcoinos-server-fc19ca29073fc4fc193af583dde6a9e15fa776ba.tar.gz
coinos-server-fc19ca29073fc4fc193af583dde6a9e15fa776ba.zip
tweak user_id reference
Diffstat (limited to 'db/migrations/20210714123455_data_fixes_merge.js')
-rw-r--r--db/migrations/20210714123455_data_fixes_merge.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/db/migrations/20210714123455_data_fixes_merge.js b/db/migrations/20210714123455_data_fixes_merge.js
index d6ba3a3a..eb873554 100644
--- a/db/migrations/20210714123455_data_fixes_merge.js
+++ b/db/migrations/20210714123455_data_fixes_merge.js
@@ -8,9 +8,9 @@ exports.up = function(knex) {
knex.raw("alter table orders add rate double"),
knex.raw("update orders set rate = v1/v2"),
- knex.raw('update accounts left join users on accounts.user_id = users.id set user_id = null where length(username) > 32')
- knex.raw('update accounts left join users on accounts.user_id = users.id set user_id = null where users.id is null')
- knex.raw('delete from accounts where users.id is null'),
+ knex.raw('update accounts left join users on accounts.user_id = users.id set user_id = null where length(username) > 32'),
+ knex.raw('update accounts left join users on accounts.user_id = users.id set user_id = null where users.id is null'),
+ knex.raw('delete from accounts where user_id is null'),
knex.raw('delete from users where length(username) > 32')
])
}