Merge branch 'development' of https://gitlab.com/xevidos/codiad into development

This commit is contained in:
xevidos 2019-09-27 14:03:04 -04:00
commit ecd0f63d63
2 changed files with 84 additions and 6 deletions

View file

@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `active` (
`path` text NOT NULL, `path` text NOT NULL,
`position` varchar(255) DEFAULT NULL, `position` varchar(255) DEFAULT NULL,
`focused` varchar(255) NOT NULL `focused` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --
-- Table structure for table `access` -- Table structure for table `access`
@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `access` (
`user` int NOT NULL, `user` int NOT NULL,
`project` int NOT NULL, `project` int NOT NULL,
`level` int NOT NULL `level` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS `options` (
`id` int PRIMARY KEY AUTO_INCREMENT NOT NULL, `id` int PRIMARY KEY AUTO_INCREMENT NOT NULL,
`name` varchar(255) UNIQUE NOT NULL, `name` varchar(255) UNIQUE NOT NULL,
`value` text NOT NULL `value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `projects` (
`name` varchar(255) NOT NULL, `name` varchar(255) NOT NULL,
`path` text NOT NULL, `path` text NOT NULL,
`owner` int NOT NULL, `owner` int NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -62,7 +62,7 @@ CREATE TABLE IF NOT EXISTS `users` (
`access` int NOT NULL, `access` int NOT NULL,
`token` varchar(255) DEFAULT NULL, `token` varchar(255) DEFAULT NULL,
UNIQUE KEY `username` ( `username` ) UNIQUE KEY `username` ( `username` )
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -76,4 +76,4 @@ CREATE TABLE IF NOT EXISTS `user_options` (
`user` int NOT NULL, `user` int NOT NULL,
`value` text NOT NULL, `value` text NOT NULL,
UNIQUE KEY `name_user` (`name`,`user`) UNIQUE KEY `name_user` (`name`,`user`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View 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")
);