mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Added mysql table creation script
This commit is contained in:
parent
51a6642a4f
commit
99fda757be
70
components/sql/scripts/mysql.sql
Normal file
70
components/sql/scripts/mysql.sql
Normal 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;
|
Loading…
Reference in New Issue
Block a user