diff options
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/transaction_type_to_integer.sql | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/deploy/transaction_type_to_integer.sql b/deploy/transaction_type_to_integer.sql new file mode 100644 index 0000000..8f18f5a --- /dev/null +++ b/deploy/transaction_type_to_integer.sql @@ -0,0 +1,10 @@ +-- Deploy kakeibo:transaction_type_to_integer to pg +-- requires: transactions + +BEGIN; + +ALTER TABLE kakeibo.transactions + ALTER COLUMN type TYPE integer + USING CASE type WHEN 'outgo' THEN 0 ELSE 1 END; + +COMMIT; |