path: root/src/stasis/stasis-0001.sql
diff options
Diffstat (limited to 'src/stasis/stasis-0001.sql')
1 files changed, 29 insertions, 0 deletions
diff --git a/src/stasis/stasis-0001.sql b/src/stasis/stasis-0001.sql
index 87dde94..e0ebfa6 100644
--- a/src/stasis/stasis-0001.sql
+++ b/src/stasis/stasis-0001.sql
@@ -193,5 +193,34 @@ COMMENT ON INDEX anastasis_challengecode_expiration_index
IS 'for challenge garbage collection';
+CREATE TABLE IF NOT EXISTS anastasis_auth_iban_in
+ (auth_in_serial_id BIGSERIAL UNIQUE
+ ,wire_reference INT8 NOT NULL PRIMARY KEY
+ ,wire_subject TEXT NOT NULL
+ ,credit_val INT8 NOT NULL
+ ,credit_frac INT4 NOT NULL
+ ,debit_account_details TEXT NOT NULL
+ ,credit_account_details TEXT NOT NULL
+ ,execution_date INT8 NOT NULL
+ );
+COMMENT ON TABLE anastasis_auth_iban_in
+ IS 'list of IBAN wire transfers for authentication using the IBAN plugin';
+COMMENT ON COLUMN anastasis_auth_iban_in.wire_reference
+ IS 'Unique number identifying the wire transfer in LibEuFin/Nexus';
+COMMENT ON COLUMN anastasis_auth_iban_in.wire_subject
+ IS 'For authentication, this contains the code, but also additional text';
+COMMENT ON COLUMN anastasis_auth_iban_in.execution_date
+ IS 'Used both for (theoretical) garbage collection and to see if the transfer happened on time';
+COMMENT ON COLUMN anastasis_auth_iban_in.credit_account_details
+ IS 'Identifies the bank account of the Anastasis provider, which could change over time';
+COMMENT ON COLUMN anastasis_auth_iban_in.debit_account_details
+ IS 'Identifies the bank account of the customer, which must match what was given in the truth';
+CREATE INDEX IF NOT EXISTS anastasis_auth_iban_in_lookup_index
+ ON anastasis_auth_iban_in
+ (debit_account_details
+ ,execution_date
+ );
-- Complete transaction