aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--db/migrations/20210714123455_data_fixes_merge.js5
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");
+
])
}