diff --git a/components/sql/scripts/mysql.sql b/components/sql/scripts/mysql.sql new file mode 100644 index 0000000..8ce1931 --- /dev/null +++ b/components/sql/scripts/mysql.sql @@ -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;