diff options
| author | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-08 21:05:34 -0800 |
| commit | dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7 (patch) | |
| tree | 6c6b8930ebe9c2cc5b8d1f759e61260f509fdd7a /db/migrations/20210714123455_data_fixes_merge.js | |
| parent | f7b844883506a8072213245b9b8a2b988694e4f5 (diff) | |
| download | coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.tar.gz coinos-server-dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7.zip | |
tech debt jubilee
Diffstat (limited to 'db/migrations/20210714123455_data_fixes_merge.js')
| -rw-r--r-- | db/migrations/20210714123455_data_fixes_merge.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/db/migrations/20210714123455_data_fixes_merge.js b/db/migrations/20210714123455_data_fixes_merge.js deleted file mode 100644 index dfe96509..00000000 --- a/db/migrations/20210714123455_data_fixes_merge.js +++ /dev/null @@ -1,22 +0,0 @@ -export const up = function(knex) { - return Promise.all([ - knex.raw("delete from invoices where invoices.account_id not in (select id from accounts)"), - knex.raw("delete from orders where orders.a1_id not in (select id from accounts) or orders.a2_id not in (select id from accounts)"), - knex.raw("update users set account_id = 10427 where id = 6262 and account_id = 10428"), - knex.raw("delete from payments where account_id not in (select id from accounts)"), - knex.raw("alter table orders drop rate"), - 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 user_id is null'), - knex.raw('delete from users where length(username) > 32') - ]) -}; - -export const down = function(knex) { - return Promise.all([ - - ]) -}; |
