move schema to sqlfile, create on init.

This commit is contained in:
fiatjaf
2019-12-13 20:34:19 -03:00
parent 978854fc72
commit 7097d01f9e
4 changed files with 35 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
CREATE TABLE IF NOT EXISTS accounts (
userhash text PRIMARY KEY,
email text,
pass text
);
CREATE TABLE IF NOT EXISTS wallets (
hash text PRIMARY KEY,
name text NOT NULL,
user text NOT NULL,
adminkey text NOT NULL,
inkey text
);
CREATE TABLE IF NOT EXISTS apipayments (
payhash text PRIMARY KEY,
amount integer NOT NULL,
fee integer NOT NULL,
wallet text NOT NULL,
pending boolean NOT NULL,
memo text
);