diff options
Diffstat (limited to 'src/mint/mint_db.c')
-rw-r--r-- | src/mint/mint_db.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mint/mint_db.c b/src/mint/mint_db.c index e029d0567..b84af0f22 100644 --- a/src/mint/mint_db.c +++ b/src/mint/mint_db.c | |||
@@ -164,16 +164,8 @@ TALER_MINT_DB_create_tables (int temporary) | |||
164 | ",balance_fraction INT4 NOT NULL" | 164 | ",balance_fraction INT4 NOT NULL" |
165 | ",expiration_date INT8 NOT NULL" | 165 | ",expiration_date INT8 NOT NULL" |
166 | ");"); | 166 | ");"); |
167 | result = PQexec (conn, | 167 | /* Create an index on the foreign key as it is not created automatically by PSQL */ |
168 | "CREATE INDEX reserves_in_index ON reserves_in (reserve_pub);"); | 168 | SQLEXEC ("CREATE INDEX reserves_in_index ON reserves_in (reserve_pub);"); |
169 | if (PGRES_COMMAND_OK != PQresultStatus (result)) | ||
170 | { | ||
171 | ExecStatusType status = PQresultStatus (result); | ||
172 | PQclear (result); | ||
173 | result = NULL; | ||
174 | goto SQLEXEC_fail; | ||
175 | } | ||
176 | PQclear (result); | ||
177 | SQLEXEC ("CREATE TABLE IF NOT EXISTS collectable_blindcoins" | 169 | SQLEXEC ("CREATE TABLE IF NOT EXISTS collectable_blindcoins" |
178 | "(" | 170 | "(" |
179 | "blind_ev BYTEA PRIMARY KEY" | 171 | "blind_ev BYTEA PRIMARY KEY" |