commit 259ad4426b5d29cc97b7c58a8640a0301b81eea3
parent 3715147a0639a8c230396b8e4d13d195982c4e46
Author: rbckman <rob@tarina.org>
Date: Fri, 23 Oct 2020 21:01:48 +0300
adminlevel implement in db
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/db/makedb.sh b/db/makedb.sh
@@ -8,6 +8,6 @@ CREATE TABLE bildkommentar (id integer PRIMARY KEY, datumtid TIMESTAMP, user TEX
CREATE TABLE stopflood (id integer PRIMARY KEY, ip TEXT, tid INT);
CREATE TABLE likes (id integer PRIMARY KEY, user TEXT, bild TEXT, datum TIMESTAMP);
CREATE TABLE hates (id integer PRIMARY KEY, user TEXT, bild TEXT, datum TIMESTAMP);
-CREATE TABLE bildadmin (id INT AUTO_INCREMENT, name TEXT, displayname TEXT, password TEXT, mail TEXT, subscribe TEXT, salt TEXT);
+CREATE TABLE bildadmin (id INT AUTO_INCREMENT, name TEXT, displayname TEXT, password TEXT, mail TEXT, subscribe TEXT, adminlevel INT);
CREATE TABLE stopresetpass (id integer PRIMARY KEY, mail TEXT, tid INT);
EOF
diff --git a/db/updatedb.sh b/db/updatedb.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+sqlite3 bygdis.db <<EOF
+ALTER TABLE bildadmin ADD COLUMN adminlevel INT;
+EOF