Added mysql table creation script

This commit is contained in:
xevidos 2019-07-17 11:57:46 -04:00
parent 51a6642a4f
commit 99fda757be

View File

@ -0,0 +1,70 @@
--
-- Table structure for table `active`
--
CREATE TABLE IF NOT EXISTS `active` (
`username` varchar(255) NOT NULL,
`path` text NOT NULL,
`position` varchar(255) DEFAULT NULL,
`focused` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `options`
--
CREATE TABLE IF NOT EXISTS `options` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
`name` varchar(255) UNIQUE NOT NULL,
`value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `projects`
--
CREATE TABLE IF NOT EXISTS `projects` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
`name` varchar(255) NOT NULL,
`path` text NOT NULL,
`owner` varchar(255) NOT NULL,
`access` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`username` varchar(255) NOT NULL,
`password` text NOT NULL,
`email` varchar(255) DEFAULT NULL,
`project` int DEFAULT NULL,
`access` int NOT NULL,
`token` varchar(255) DEFAULT NULL,
UNIQUE KEY `username` ( `username` )
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `user_options`
--
CREATE TABLE IF NOT EXISTS `user_options` (
`id` int(11) PRIMARY KEY AUTO_INCREMENT NOT NULL,
`name` varchar(255) NOT NULL,
`user` int NOT NULL,
`value` text NOT NULL,
UNIQUE KEY `name_user` (`name`,`user`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;