From 4d7ccd65f41d01babc8e438283456de0627e2ff5 Mon Sep 17 00:00:00 2001
From: Masaya Tojo <masaya@tojo.tokyo>
Date: Wed, 19 Apr 2023 09:55:20 +0900
Subject: Revert "Rename type_code column to type and change type to
 transaction_type."

This reverts commit 5d7203d5ca85c44391d4bb250f8fbb6ecd7afd29.
---
 revert/kakeibo.transactions.sql | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'revert/kakeibo.transactions.sql')

diff --git a/revert/kakeibo.transactions.sql b/revert/kakeibo.transactions.sql
index a31898f..d30390a 100644
--- a/revert/kakeibo.transactions.sql
+++ b/revert/kakeibo.transactions.sql
@@ -1,12 +1,8 @@
--- Deploy kakeibo:transactions to pg
--- requires: schema
--- requires: articles
+-- Revert kakeibo:transactions from pg
 
 BEGIN;
 
-ALTER TABLE kakeibo.transactions RENAME COLUMN type TO type_code;
 ALTER TABLE kakeibo.transactions
-  ALTER COLUMN type_code TYPE integer
-  USING CASE type_code WHEN 'outgo' THEN 0 ELSE 1 END;
+  DROP COLUMN article_id;
 
 COMMIT;
-- 
cgit v1.2.3

