aboutsummaryrefslogtreecommitdiff
path: root/deploy/transactions_type_code_fkey.sql
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/transactions_type_code_fkey.sql')
-rw-r--r--deploy/transactions_type_code_fkey.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/transactions_type_code_fkey.sql b/deploy/transactions_type_code_fkey.sql
new file mode 100644
index 0000000..ba4406b
--- /dev/null
+++ b/deploy/transactions_type_code_fkey.sql
@@ -0,0 +1,12 @@
+-- Deploy kakeibo:transactions_type_code_fkey to pg
+-- requires: transactions
+-- requires: types
+
+BEGIN;
+
+ALTER TABLE kakeibo.transactions
+ ADD CONSTRAINT transactions_type_code_fkey
+ FOREIGN KEY (type_code)
+ REFERENCES kakeibo.types (code);
+
+COMMIT;