diff options
Diffstat (limited to 'src/exchangedb/0002-denominations.sql')
| -rw-r--r-- | src/exchangedb/0002-denominations.sql | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/exchangedb/0002-denominations.sql b/src/exchangedb/0002-denominations.sql index a18a752b..d468a387 100644 --- a/src/exchangedb/0002-denominations.sql +++ b/src/exchangedb/0002-denominations.sql @@ -14,13 +14,7 @@ -- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -- -CREATE OR REPLACE FUNCTION create_table_denominations() -RETURNS VOID -LANGUAGE plpgsql -AS $$ -BEGIN - -CREATE TABLE IF NOT EXISTS denominations +CREATE TABLE denominations (denominations_serial BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE ,denom_pub_hash BYTEA PRIMARY KEY CHECK (LENGTH(denom_pub_hash)=64) ,denom_type INT4 NOT NULL DEFAULT (1) -- 1 == RSA (for now, remove default later!) @@ -51,22 +45,6 @@ COMMENT ON COLUMN denominations.age_mask COMMENT ON COLUMN denominations.denominations_serial IS 'needed for exchange-auditor replication logic'; -CREATE INDEX IF NOT EXISTS denominations_by_expire_legal_index +CREATE INDEX denominations_by_expire_legal_index ON denominations (expire_legal); - -END -$$; - -INSERT INTO exchange_tables - (name - ,version - ,action - ,partitioned - ,by_range) - VALUES - ('denominations' - ,'exchange-0002' - ,'create' - ,FALSE - ,FALSE); |
