From 6ab45f07ab066cd595701a85c87c7ae7f19cd733 Mon Sep 17 00:00:00 2001 From: "alvarenga.milton" Date: Sun, 3 Mar 2019 16:27:59 -0300 Subject: [PATCH] Added SQL install file compatible with SQLite for future use, when all queries and PDO connections has been adapted to support this new database --- components/install/sql/sqlite.sql | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 components/install/sql/sqlite.sql diff --git a/components/install/sql/sqlite.sql b/components/install/sql/sqlite.sql new file mode 100644 index 0000000..4eec35e --- /dev/null +++ b/components/install/sql/sqlite.sql @@ -0,0 +1,53 @@ +-- +-- Table structure for table options +-- + +CREATE TABLE IF NOT EXISTS options ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name CHAR(255) NOT NULL UNIQUE, + value TEXT NOT NULL +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table projects +-- + +CREATE TABLE IF NOT EXISTS projects ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name CHAR(255) NOT NULL, + path CHAR(255) NOT NULL UNIQUE, + owner CHAR(255) NOT NULL UNIQUE, + access text +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table users +-- + +CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + first_name CHAR(255) DEFAULT NULL, + last_name CHAR(255) DEFAULT NULL, + username CHAR(255) NOT NULL UNIQUE, + password text NOT NULL, + email CHAR(255) DEFAULT NULL, + project CHAR(255) DEFAULT NULL, + access CHAR(255) NOT NULL, + groups text, + token text +); + +-- +-- Table structure for table user_options +-- + +CREATE TABLE IF NOT EXISTS user_options ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name CHAR(255) NOT NULL UNIQUE, + username CHAR(255) NOT NULL UNIQUE, + value text NOT NULL +);