-- phpMyAdmin SQL Dump -- version 4.4.15.4 -- http://www.phpmyadmin.net -- -- Host: s443.loopia.se -- Generation Time: Feb 20, 2016 at 12:30 AM -- Server version: 5.6.22-log -- PHP Version: 5.4.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `brolaugh_se_db_3` -- -- -------------------------------------------------------- -- -- Table structure for table `status` -- CREATE TABLE IF NOT EXISTS `status` ( `id` int(11) NOT NULL, `task` int(11) NOT NULL, `status_level` int(11) NOT NULL, `user` varchar(50) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `status_level` -- CREATE TABLE IF NOT EXISTS `status_level` ( `id` int(11) NOT NULL, `plain_text` varchar(30) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `task` -- CREATE TABLE IF NOT EXISTS `task` ( `id` int(11) NOT NULL, `title` varchar(70) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `status` -- ALTER TABLE `status` ADD PRIMARY KEY (`id`), ADD KEY `status_constraint` (`task`,`status_level`), ADD KEY `status_level_constraint` (`status_level`); -- -- Indexes for table `status_level` -- ALTER TABLE `status_level` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `plain_text` (`plain_text`); -- -- Indexes for table `task` -- ALTER TABLE `task` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `status` -- ALTER TABLE `status` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `status_level` -- ALTER TABLE `status_level` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `task` -- ALTER TABLE `task` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `status` -- ALTER TABLE `status` ADD CONSTRAINT `status_level_constraint` FOREIGN KEY (`status_level`) REFERENCES `status_level` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `status_task_constraint` FOREIGN KEY (`task`) REFERENCES `task` (`id`) ON DELETE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;