%PDF- %PDF-
Direktori : /data/www_bck/varak.net_bck/mpr.varak.net/ |
Current File : //data/www_bck/varak.net_bck/mpr.varak.net/database.sql |
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 29, 2014 at 09:20 PM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `mpr` -- -- -------------------------------------------------------- -- -- Table structure for table `committees` -- CREATE TABLE IF NOT EXISTS `committees` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) COLLATE utf8_bin NOT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `type` enum('written','oral') COLLATE utf8_bin NOT NULL, `qualification` enum('administrator') COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=2 ; -- -- Dumping data for table `committees` -- INSERT INTO `committees` (`id`, `title`, `date`, `type`, `qualification`) VALUES (1, 'Vesela zkouska', '2014-05-09 12:00:00', 'written', 'administrator'); -- -------------------------------------------------------- -- -- Table structure for table `committee_members` -- CREATE TABLE IF NOT EXISTS `committee_members` ( `id` int(11) NOT NULL AUTO_INCREMENT, `committee` int(11) NOT NULL, `user` int(11) NOT NULL, `isowner` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `comittee` (`committee`), KEY `user` (`user`), KEY `user_2` (`user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=3 ; -- -- Dumping data for table `committee_members` -- INSERT INTO `committee_members` (`id`, `committee`, `user`, `isowner`) VALUES (1, 1, 1, 1), (2, 1, 3, 0); -- -------------------------------------------------------- -- -- Table structure for table `committee_signups` -- CREATE TABLE IF NOT EXISTS `committee_signups` ( `id` int(11) NOT NULL AUTO_INCREMENT, `committee` int(11) NOT NULL, `user` int(11) NOT NULL, `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `committee` (`committee`), KEY `user` (`user`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(60) COLLATE utf8_bin NOT NULL, `password` varchar(40) COLLATE utf8_bin NOT NULL, `role` varchar(20) COLLATE utf8_bin NOT NULL, `name` varchar(255) COLLATE utf8_bin NOT NULL, `phone` varchar(255) COLLATE utf8_bin NOT NULL, `mail` varchar(255) COLLATE utf8_bin NOT NULL, `address` varchar(255) COLLATE utf8_bin NOT NULL, `birthnumber` bigint(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=4 ; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `username`, `password`, `role`, `name`, `phone`, `mail`, `address`, `birthnumber`) VALUES (1, 'waritko', '8fb2bcea4b47f70e7b689ef23481f9403e5682dd', 'admin', 'Martin Vařák', '+420777558159', 'martin@varak.net', 'Nekde', 8811115566), (3, 'demo', '2c5c79c76c826465c22132e3febe937ed54a533b', 'secretary', 'Demo Demovic Druhy', '420777558159', 'martin@varak.net', 'Adresa', 8712175725); -- -- Constraints for dumped tables -- -- -- Constraints for table `committee_members` -- ALTER TABLE `committee_members` ADD CONSTRAINT `committee_members_ibfk_3` FOREIGN KEY (`committee`) REFERENCES `committees` (`id`), ADD CONSTRAINT `committee_members_ibfk_2` FOREIGN KEY (`user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `committee_signups` -- ALTER TABLE `committee_signups` ADD CONSTRAINT `committee_signups_ibfk_2` FOREIGN KEY (`user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `committee_signups_ibfk_1` FOREIGN KEY (`committee`) REFERENCES `committees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;