CREATE TABLE `agileweb_ci_sessions` ( `session_id` varchar(40) NOT NULL default '0', `ip_address` varchar(16) NOT NULL default '0', `user_agent` varchar(50) NOT NULL, `last_activity` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_competitions` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `description` text NOT NULL, `ord` int(10) unsigned NOT NULL default '0', `points_type` tinyint(3) unsigned NOT NULL, `has_time` tinyint(3) unsigned NOT NULL, `length` double NOT NULL default '0', `merge_with_competition_id` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_competitions2size_categories` ( `competition_id` int(10) unsigned NOT NULL, `size_category_id` int(10) unsigned NOT NULL, PRIMARY KEY (`competition_id`,`size_category_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_competitions_excludes` ( `a_id` int(10) unsigned NOT NULL, `b_id` int(10) unsigned NOT NULL, PRIMARY KEY (`a_id`,`b_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_dogs` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) collate utf8_polish_ci NOT NULL, `breed` varchar(255) collate utf8_polish_ci NOT NULL, `size` int(10) unsigned NOT NULL, `birth_date` date NOT NULL, `user_id` int(10) unsigned NOT NULL, `origin_name` varchar(255) collate utf8_polish_ci NOT NULL, `sex` enum('pies','suka') collate utf8_polish_ci NOT NULL default 'pies', `is_veteran` tinyint(1) unsigned NOT NULL, `deleted` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci ; CREATE TABLE `agileweb_run_results` ( `id` int(10) unsigned NOT NULL, `time` double NOT NULL default '0', `points` double NOT NULL default '0', `points_for_errors` int(11) NOT NULL default '0', `points_for_denials` int(11) NOT NULL default '0', `points_for_time` double NOT NULL default '0', `disqualification` tinyint(1) unsigned NOT NULL default '0', `not_present` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_runs` ( `id` int(10) unsigned NOT NULL auto_increment, `user_id` int(10) unsigned NOT NULL, `dog_id` int(10) unsigned NOT NULL, `new_user_full_name` varchar(255) character set utf8 collate utf8_polish_ci NOT NULL, `new_dog_name` varchar(255) character set utf8 collate utf8_polish_ci NOT NULL, `tournament_id` int(10) unsigned NOT NULL, `competition_id` int(10) unsigned NOT NULL, `size_category_id` int(10) unsigned NOT NULL, `starting_number` int(11) NOT NULL, `starting_position` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `dog_id` (`dog_id`), KEY `tournament_id` (`tournament_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_size_categories` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) character set utf8 collate utf8_polish_ci NOT NULL, `short_name` varchar(255) character set utf8 collate utf8_polish_ci NOT NULL, `min_height` int(11) NOT NULL, `ord` int(10) unsigned NOT NULL default '0', `sct_time` double NOT NULL default '0', `mct_time` double NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; CREATE TABLE `agileweb_tournaments` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `description` text NOT NULL, `date` date NOT NULL, PRIMARY KEY (`id`), KEY `date` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; CREATE TABLE `agileweb_tournaments2competitions` ( `tournament_id` int(10) unsigned NOT NULL, `competition_id` int(10) unsigned NOT NULL, PRIMARY KEY (`tournament_id`,`competition_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `agileweb_users` ( `id` int(10) unsigned NOT NULL auto_increment, `firstname` varchar(255) collate utf8_polish_ci NOT NULL, `lastname` varchar(255) collate utf8_polish_ci NOT NULL, `username` varchar(255) collate utf8_polish_ci NOT NULL, `password` varchar(32) collate utf8_polish_ci NOT NULL, `new_password` varchar(255) collate utf8_polish_ci NOT NULL, `salt` varchar(32) collate utf8_polish_ci NOT NULL, `salted_password` varchar(32) collate utf8_polish_ci NOT NULL, `email` varchar(255) collate utf8_polish_ci NOT NULL, `telephone` varchar(32) collate utf8_polish_ci NOT NULL, `address_city` varchar(255) collate utf8_polish_ci NOT NULL, `address_street` varchar(255) collate utf8_polish_ci NOT NULL, `address_postal_code` varchar(16) collate utf8_polish_ci NOT NULL, `club_name` varchar(255) collate utf8_polish_ci NOT NULL, `user_type` tinyint(3) unsigned NOT NULL, `activated` tinyint(3) unsigned NOT NULL, `activation_code` varchar(32) collate utf8_polish_ci NOT NULL, `deleted` tinyint(1) unsigned NOT NULL, `is_junior` tinyint(1) unsigned NOT NULL, `is_debutant` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `username` (`username`,`password`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci ; -- pierwszy user: "admin" z haslem "admin" INSERT INTO `agileweb_users` (`id`, `firstname`, `lastname`, `username`, `password`, `new_password`, `salt`, `salted_password`, `email`, `telephone`, `address_city`, `address_street`, `address_postal_code`, `club_name`, `user_type`, `activated`, `activation_code`, `deleted`, `is_junior`, `is_debutant`) VALUES (1, 'Adminowicz', 'Pierwszy', 'admin', '21232f297a57a5a743894a0e4a801fc3', '', '2eb8b139dfcf977f27fd3ab510bfd372', 'e8963bdaf6e995f967542cb729eab17c', 'someone@somewhere.com', '', '', '', '', '', 2, 1, '', 0, 0, 0);