From a5ef334349232d65dbfce6a5be09406a7fcced0a Mon Sep 17 00:00:00 2001 From: Peter Rounce Date: Wed, 24 Aug 2022 13:04:49 +0000 Subject: [PATCH] simplify database creation --- add_card_data.sql | 26 -------------------------- s_create_db | 1 - 2 files changed, 27 deletions(-) delete mode 100644 add_card_data.sql diff --git a/add_card_data.sql b/add_card_data.sql deleted file mode 100644 index c693091..0000000 --- a/add_card_data.sql +++ /dev/null @@ -1,26 +0,0 @@ -\c card_db - -INSERT INTO cards ( - lock_key, /* this is key 0 on the card */ - aes_cmac, /* this is key 2 on the card */ - uid, /* this can be discovered from the service log */ - last_counter_value, /* can start at zero and will be updated on first use (before issue) */ - lnurlw_request_timeout_sec, /* 60 seconds by default */ - enable_flag, /* useful for quickly switching card hosting on/off */ - tx_limit_sats, /* set at a reasonable value for small test payments in 2022 */ - day_limit_sats, /* set at a reasonable value for small test payments in 2022 */ - card_description, /* to store a human readable card description (optional) */ - one_time_code_used /* used to indicate if the one_time_code for card creation is live */ -) - VALUES ( - '00000000000000000000000000000000', - '00000000000000000000000000000000', - '00000000000000', - 0, - 60, - 'Y', - 1000, - 10000, - 'bolt card', - 'Y' - ); diff --git a/s_create_db b/s_create_db index fadfa94..3bc66de 100755 --- a/s_create_db +++ b/s_create_db @@ -3,4 +3,3 @@ sudo systemctl stop postgresql sudo systemctl start postgresql psql postgres -f create_db.sql -psql postgres -f add_card_data.sql