Add mysql schemes and add test admin user for sqlite

This commit is contained in:
Peder Bergebakken Sundt 2018-02-10 18:00:32 +01:00
parent 49048fc973
commit 6f2ab1ac00
3 changed files with 27 additions and 24 deletions

5
dist/pvv.sql vendored
View File

@ -20,4 +20,7 @@ CREATE TABLE "projects" (
CREATE TABLE "users" ( CREATE TABLE "users" (
"uname" TEXT, "uname" TEXT,
"groups" INT DEFAULT 0 "groups" INT DEFAULT 0
); );
INSERT INTO users (uname, groups)
VALUES ("min_test_bruker", 1);

23
dist/pvv_mysql.sql vendored Normal file
View File

@ -0,0 +1,23 @@
CREATE TABLE events (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`start` TEXT,
`stop` TEXT,
`organiser` TEXT,
`location` TEXT,
`description` TEXT
);
CREATE TABLE projects (
`id` INTEGER PRIMARY KEY AUTO_INCREMENT,
`name` TEXT,
`owner` TEXT,
`owneruname` TEXT,
`description` TEXT,
`active` BOOLEAN
);
CREATE TABLE users (
`uname` TEXT,
`groups` INT DEFAULT 0
);

23
pvv.sql
View File

@ -1,23 +0,0 @@
CREATE TABLE "events" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"start" TEXT,
"stop" TEXT,
"organiser" TEXT,
"location" TEXT,
"description" TEXT
);
CREATE TABLE "projects" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"owner" TEXT,
"owneruname" TEXT,
"description" TEXT,
"active" BOOLEAN
);
CREATE TABLE "users" (
"uname" TEXT,
"groups" INT DEFAULT 0
);