mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Merge branch 'add_postgresql_support_to_components_sql_scripts' into 'development'
Added support to postgresql on components/sql/scripts See merge request xevidos/codiad!15
This commit is contained in:
commit
292bcf2f57
78
components/sql/scripts/postgresql.sql
Normal file
78
components/sql/scripts/postgresql.sql
Normal file
@ -0,0 +1,78 @@
|
||||
--
|
||||
-- Table structure for table active
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS active (
|
||||
"user" integer NOT NULL,
|
||||
path text NOT NULL,
|
||||
position varchar(255) DEFAULT NULL,
|
||||
focused varchar(255) NOT NULL
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table access
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS access (
|
||||
"user" integer NOT NULL,
|
||||
project integer NOT NULL,
|
||||
level integer NOT NULL
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table options
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS options (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name varchar(255) UNIQUE NOT NULL,
|
||||
value text NOT NULL
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table projects
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS projects (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name varchar(255) NOT NULL,
|
||||
path text NOT NULL,
|
||||
owner integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table users
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
first_name varchar(255) DEFAULT NULL,
|
||||
last_name varchar(255) DEFAULT NULL,
|
||||
username varchar(255) UNIQUE NOT NULL,
|
||||
password text NOT NULL,
|
||||
email varchar(255) DEFAULT NULL,
|
||||
project integer DEFAULT NULL,
|
||||
access integer NOT NULL,
|
||||
token varchar(255) DEFAULT NULL
|
||||
);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table user_options
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_options (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name varchar(255) NOT NULL,
|
||||
"user" integer NOT NULL,
|
||||
value text NOT NULL,
|
||||
UNIQUE (name,"user")
|
||||
);
|
Loading…
Reference in New Issue
Block a user