[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-anastasis] branch master updated: Added create state
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-anastasis] branch master updated: Added create statements |
Date: |
Mon, 14 Oct 2019 11:36:55 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 175b7a2 Added create statements
175b7a2 is described below
commit 175b7a215b28e4afbfe6fe1d971647200a4bacaf
Author: Dennis Neufeld <address@hidden>
AuthorDate: Mon Oct 14 11:36:50 2019 +0200
Added create statements
---
src/backup-db/plugin_anastasis_postgres.c | 41 +++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/src/backup-db/plugin_anastasis_postgres.c
b/src/backup-db/plugin_anastasis_postgres.c
index a74e22a..4f45b21 100644
--- a/src/backup-db/plugin_anastasis_postgres.c
+++ b/src/backup-db/plugin_anastasis_postgres.c
@@ -455,20 +455,47 @@ postgres_find_contract_terms_by_date_and_range (void *cls,
* @return NULL on error, otherwise a `struct TALER_ANASTASISDB_Plugin`
*/
void *
-libtaler_plugin_anastasisdb_postgres_init (void *cls)
+plugin_anastasis_db_postgres_init (void *cls)
{
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
struct PostgresClosure *pg;
- struct TALER_ANASTASISDB_Plugin *plugin;
+ struct ANASTASIS_DB_Plugin *plugin;
const char *ec;
struct GNUNET_PQ_ExecuteStatement es[] = {
/* Orders created by the frontend, not signed or given a nonce yet.
The contract terms will change (nonce will be added) when moved to the
contract terms table */
- GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS anastasis_foo ("
- "order_id VARCHAR NOT NULL"
- ",PRIMARY KEY (order_id)"
- ");"),
+ GNUNET_PQ_make_execute ("CREATE TABLE anastasis_truth
+ ( truth_id uuid PRIMARY KEY NOT NULL,
+ truth_method VARCHAR,
+ truth_mimetype VARCHAR,
+ truth bytea,
+ expiration timestamp,
+ key_share_data bytea
+ );"),
+
+ GNUNET_PQ_make_execute ("CREATE TABLE anastasis_user
+ ( user_id bytea PRIMARY KEY,
+ downloads integer,
+ last_payment timestamp
+ );"),
+
+ GNUNET_PQ_make_execute ("CREATE TABLE anastasis_payments
+ ( payment_id integer PRIMARY KEY,
+ user_id bytea REFERENCES anastasis_user(user_id),
+ postcounter integer,
+ payment_secret bytea,
+ transaction_time timestamp,
+ paid_until timestamp
+ );"),
+
+ GNUNET_PQ_make_execute ("CREATE TABLE anastasis_recoverydocument
+ ( user_id bytea REFERENCES anastasis_user(user_id),
+ version integer,
+ recovery_data bytea,
+ PRIMARY KEY (user_id, version)
+ );"),
+
GNUNET_PQ_EXECUTE_STATEMENT_END
};
struct GNUNET_PQ_PreparedStatement ps[] = {
@@ -491,7 +518,7 @@ libtaler_plugin_anastasisdb_postgres_init (void *cls)
GNUNET_free (pg);
return NULL;
}
- plugin = GNUNET_new (struct TALER_ANASTASISDB_Plugin);
+ plugin = GNUNET_new (struct ANASTASIS_DB_Plugin);
plugin->cls = pg;
plugin->drop_tables = &postgres_drop_tables;
plugin->start = postgres_start;
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-anastasis] branch master updated: Added create statements,
gnunet <=