aboutsummaryrefslogtreecommitdiff
path: root/src/stasis/stasis-0001.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/stasis/stasis-0001.sql')
-rw-r--r--src/stasis/stasis-0001.sql29
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
193 IS 'for challenge garbage collection'; 193 IS 'for challenge garbage collection';
194 194
195 195
196CREATE TABLE IF NOT EXISTS anastasis_auth_iban_in
197 (auth_in_serial_id BIGSERIAL UNIQUE
198 ,wire_reference INT8 NOT NULL PRIMARY KEY
199 ,wire_subject TEXT NOT NULL
200 ,credit_val INT8 NOT NULL
201 ,credit_frac INT4 NOT NULL
202 ,debit_account_details TEXT NOT NULL
203 ,credit_account_details TEXT NOT NULL
204 ,execution_date INT8 NOT NULL
205 );
206COMMENT ON TABLE anastasis_auth_iban_in
207 IS 'list of IBAN wire transfers for authentication using the IBAN plugin';
208COMMENT ON COLUMN anastasis_auth_iban_in.wire_reference
209 IS 'Unique number identifying the wire transfer in LibEuFin/Nexus';
210COMMENT ON COLUMN anastasis_auth_iban_in.wire_subject
211 IS 'For authentication, this contains the code, but also additional text';
212COMMENT ON COLUMN anastasis_auth_iban_in.execution_date
213 IS 'Used both for (theoretical) garbage collection and to see if the transfer happened on time';
214COMMENT ON COLUMN anastasis_auth_iban_in.credit_account_details
215 IS 'Identifies the bank account of the Anastasis provider, which could change over time';
216COMMENT ON COLUMN anastasis_auth_iban_in.debit_account_details
217 IS 'Identifies the bank account of the customer, which must match what was given in the truth';
218
219CREATE INDEX IF NOT EXISTS anastasis_auth_iban_in_lookup_index
220 ON anastasis_auth_iban_in
221 (debit_account_details
222 ,execution_date
223 );
224
196-- Complete transaction 225-- Complete transaction
197COMMIT; 226COMMIT;