Public Sub CreateUserTableIfNeeded
Dim ct As String = ($"CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT Not Null,
username INTEGER (6) UNIQUE ON CONFLICT FAIL Not Null,
vathmos TEXT,
epitheto TEXT,
onoma TEXT,
hash BLOB Not Null,
salt BLOB Not Null,
level INTEGER (1) Not Null)"$)
Main.sql.ExecNonQuery(ct)
ct = ($"CREATE TABLE IF NOT EXISTS log (
id INTEGER PRIMARY KEY AUTOINCREMENT Not Null,
username INTEGER (6) Not Null,
last_login TEXT DEFAULT (CURRENT_TIMESTAMP))"$)
Main.sql.ExecNonQuery(ct)
ct = ($"CREATE TABLE IF NOT EXISTS registry (
id INTEGER PRIMARY KEY AUTOINCREMENT,
prot_tmima TEXT CONSTRAINT prot_tmima_replace UNIQUE ON CONFLICT REPLACE,
date_eisagogi TEXT,
epitheto TEXT,
onoma TEXT)"$)
Main.sql.ExecNonQuery(ct)
End Sub