diff options
| author | Ran Guin <[email protected]> | 2021-07-20 14:03:51 -0700 |
|---|---|---|
| committer | Ran Guin <[email protected]> | 2021-07-20 14:03:51 -0700 |
| commit | dab8ce27232e48782562419849a227f6cf7edf74 (patch) | |
| tree | f8fbb258d82487bcf00fb65314b12f021685b596 | |
| parent | e6535ed7eaffa3242665121c8299bd186ada880a (diff) | |
| download | coinos-server-dab8ce27232e48782562419849a227f6cf7edf74.tar.gz coinos-server-dab8ce27232e48782562419849a227f6cf7edf74.zip | |
remove virtual column from orders
| -rw-r--r-- | db/migrations/20210714123455_data_fixes_merge.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrations/20210714123455_data_fixes_merge.js b/db/migrations/20210714123455_data_fixes_merge.js index aed78258..3816920c 100644 --- a/db/migrations/20210714123455_data_fixes_merge.js +++ b/db/migrations/20210714123455_data_fixes_merge.js @@ -4,6 +4,11 @@ exports.up = function(knex) { 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("delete from orders where a1_id not in (select id from accounts) or a2_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"); + ]) } |
