| Update database structure |
| Create table Admin.CREATE TABLE `Admin` (`admin_id` int(11) NOT NULL AUTO_INCREMENT , `admin_login` varchar(50) NOT NULL DEFAULT '' , `admin_password` varchar(45) NOT NULL DEFAULT '' , `admin_status` set('admin','organizer','control','pos') NOT NULL DEFAULT 'organizer' , `admin_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `admin_user_id` int(11) DEFAULT NULL , `admin_ismaster` enum('No','Yes') DEFAULT 'No' , `admin_inuse` enum('No','Yes') DEFAULT 'Yes' , `control_event_ids` varchar(100) DEFAULT '' , PRIMARY KEY (`admin_id`) , KEY `admin_login` (`admin_login`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table auth.CREATE TABLE `auth` (`auth_id` int(11) NOT NULL AUTO_INCREMENT , `user_id` int(11) NOT NULL DEFAULT '0' , `username` varchar(50) NOT NULL DEFAULT '' , `password` varchar(45) NOT NULL DEFAULT '' , `active` varchar(38) DEFAULT 'not null' , `user_group` int(11) NOT NULL DEFAULT '0' , PRIMARY KEY (`auth_id`) , UNIQUE KEY `username` (`username`) , KEY `password` (`password`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table User.CREATE TABLE `User` (`user_id` int(11) NOT NULL AUTO_INCREMENT , `user_status` tinyint(4) NOT NULL DEFAULT '0' , `user_lastname` varchar(50) NOT NULL DEFAULT '' , `user_firstname` varchar(50) NOT NULL DEFAULT '' , `user_address` varchar(75) NOT NULL DEFAULT '' , `user_address1` varchar(75) DEFAULT '' , `user_zip` varchar(10) NOT NULL DEFAULT '' , `user_city` varchar(50) NOT NULL DEFAULT '' , `user_state` varchar(50) DEFAULT NULL , `user_country` varchar(5) NOT NULL DEFAULT '' , `user_phone` varchar(50) DEFAULT NULL , `user_fax` varchar(50) DEFAULT NULL , `user_email` varchar(50) NOT NULL DEFAULT '' , `user_prefs` varchar(50) DEFAULT NULL , `user_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `user_custom1` varchar(50) DEFAULT '' , `user_custom2` text , `user_custom3` int(11) DEFAULT '0' , `user_custom4` datetime DEFAULT '0000-00-00 00:00:00' , `user_owner_id` int(11) DEFAULT NULL , `user_lastlogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , `user_order_total` int(11) NOT NULL DEFAULT '0' , `user_current_tickets` int(6) NOT NULL DEFAULT '0' , `user_total_tickets` int(11) NOT NULL DEFAULT '0' , PRIMARY KEY (`user_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Category.CREATE TABLE `Category` (`category_id` int(11) NOT NULL AUTO_INCREMENT , `category_event_id` int(11) DEFAULT NULL , `category_price` decimal(10,2) DEFAULT NULL , `category_name` varchar(100) DEFAULT NULL , `category_pm_id` int(11) DEFAULT NULL , `category_pmp_id` int(11) DEFAULT NULL , `category_ident` tinyint(4) DEFAULT NULL , `category_numbering` varchar(5) NOT NULL DEFAULT 'both' , `category_size` int(11) DEFAULT NULL , `category_max` int(11) DEFAULT NULL , `category_min` int(11) DEFAULT NULL , `category_template` varchar(30) DEFAULT NULL , `category_color` varchar(10) DEFAULT NULL , `category_data` text , PRIMARY KEY (`category_id`) , KEY `category_event_id` (`category_event_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Category_stat.CREATE TABLE `Category_stat` (`cs_category_id` int(11) NOT NULL DEFAULT '0' , `cs_total` int(11) NOT NULL DEFAULT '0' , `cs_free` int(11) NOT NULL DEFAULT '0' , PRIMARY KEY (`cs_category_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table CC_Info.CREATE TABLE `CC_Info` (`cc_info_order_id` int(11) NOT NULL AUTO_INCREMENT , `cc_info_data` mediumtext NOT NULL , `cc_info_key` mediumtext NOT NULL , PRIMARY KEY (`cc_info_order_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Color.CREATE TABLE `Color` (`color_id` int(11) NOT NULL AUTO_INCREMENT , `color_code` varchar(7) NOT NULL DEFAULT '' , PRIMARY KEY (`color_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Discount.CREATE TABLE `Discount` (`discount_id` int(11) NOT NULL AUTO_INCREMENT , `discount_event_id` int(11) DEFAULT NULL , `discount_name` varchar(50) NOT NULL DEFAULT '' , `discount_type` varchar(7) NOT NULL DEFAULT '' , `discount_value` decimal(10,2) NOT NULL DEFAULT '0.00' , `discount_promo` varchar(15) DEFAULT '' , `discount_used` int(11) DEFAULT '0' , PRIMARY KEY (`discount_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Event.CREATE TABLE `Event` (`event_id` int(11) NOT NULL AUTO_INCREMENT , `event_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `event_name` varchar(100) NOT NULL DEFAULT '' , `event_text` text , `event_short_text` text , `event_url` varchar(100) DEFAULT NULL , `event_image` varchar(100) DEFAULT NULL , `event_ort_id` int(11) DEFAULT NULL , `event_pm_id` int(11) DEFAULT NULL , `event_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' , `event_date` date DEFAULT NULL , `event_time` time DEFAULT NULL , `event_open` time DEFAULT NULL , `event_end` time DEFAULT NULL , `event_status` varchar(5) NOT NULL DEFAULT '' , `event_order_limit` int(4) NOT NULL DEFAULT '0' , `event_template` varchar(30) DEFAULT NULL , `event_group_id` int(11) DEFAULT NULL , `event_mp3` varchar(200) DEFAULT NULL , `event_rep` set('main','sub') NOT NULL DEFAULT 'main,sub' , `event_main_id` int(11) DEFAULT NULL , `event_type` varchar(25) DEFAULT NULL , PRIMARY KEY (`event_id`) , KEY `event_date` (`event_date`) , KEY `event_timestamp` (`event_timestamp`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Event_group.CREATE TABLE `Event_group` (`event_group_id` int(11) NOT NULL AUTO_INCREMENT , `event_group_name` varchar(100) NOT NULL DEFAULT '' , `event_group_description` text , `event_group_image` varchar(100) DEFAULT '' , `event_group_status` varchar(5) NOT NULL DEFAULT 'unpub' , `event_group_start_date` date DEFAULT NULL , `event_group_end_date` date DEFAULT NULL , `event_group_type` varchar(25) DEFAULT NULL , PRIMARY KEY (`event_group_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Event_stat.CREATE TABLE `Event_stat` (`es_event_id` int(11) NOT NULL DEFAULT '0' , `es_total` int(11) NOT NULL DEFAULT '0' , `es_free` int(11) NOT NULL DEFAULT '0' , PRIMARY KEY (`es_event_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table email_log.CREATE TABLE `email_log` (`el_id` int(11) NOT NULL AUTO_INCREMENT , `el_order_id` int(11) DEFAULT NULL , `el_user_id` int(11) NOT NULL DEFAULT '0' , `el_failed` enum('no','yes','unknown') DEFAULT 'unknown' , `el_received` enum('no','yes') DEFAULT 'yes' , `el_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `el_action` varchar(50) NOT NULL , `el_email_uid` varchar(255) DEFAULT NULL , `el_email_to` text , `el_email_cc` text , `el_email_message` text , `el_log` text , `el_bad_emails` text , PRIMARY KEY (`el_id`) , KEY `el_order_id` (`el_order_id`) , KEY `el_user_id` (`el_user_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Handling.CREATE TABLE `Handling` (`handling_id` int(11) NOT NULL AUTO_INCREMENT , `handling_payment` varchar(25) DEFAULT NULL , `handling_shipment` enum('email','post','entrance','sp') DEFAULT NULL , `handling_fee_fix` decimal(5,2) DEFAULT NULL , `handling_fee_percent` decimal(5,2) DEFAULT NULL , `handling_email_template` tinytext , `handling_pdf_template` tinytext , `handling_pdf_ticket_template` tinytext , `handling_pdf_format` tinytext , `handling_html_template` mediumtext , `handling_sale_mode` set('sp','www') DEFAULT NULL , `handling_extra` text , `handling_text_shipment` mediumtext , `handling_text_payment` mediumtext , `handling_expires_min` int(11) DEFAULT NULL , `handling_alt` int(11) DEFAULT NULL , `handling_alt_only` enum('Yes','No') NOT NULL DEFAULT 'No' , `handling_only_manual_send` enum('Yes','No') NOT NULL DEFAULT 'No' , PRIMARY KEY (`handling_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Order.CREATE TABLE `Order` (`order_id` int(11) NOT NULL AUTO_INCREMENT , `order_user_id` int(11) NOT NULL DEFAULT '0' , `order_session_id` varchar(32) NOT NULL DEFAULT '' , `order_tickets_nr` int(11) NOT NULL DEFAULT '0' , `order_total_price` decimal(10,2) NOT NULL DEFAULT '0.00' , `order_discount_promo` varchar(15) DEFAULT '' , `order_discount_price` decimal(10,2) NOT NULL DEFAULT '0.00' , `order_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , `order_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `order_order_set` set('nofee','nocost') DEFAULT '' , `order_shipment_status` enum('none','send') NOT NULL DEFAULT 'none' , `order_payment_status` enum('none','pending','payed') NOT NULL DEFAULT 'none' , `order_payment_id` varchar(255) DEFAULT NULL , `order_handling_id` int(11) DEFAULT NULL , `order_status` enum('ord','cancel','reemit','reissue','trash','res','pros') NOT NULL DEFAULT 'ord' , `order_reemited_id` int(11) DEFAULT NULL , `order_fee` decimal(10,2) DEFAULT NULL , `order_place` varchar(11) NOT NULL DEFAULT 'www' , `order_owner_id` int(11) DEFAULT NULL , `order_date_expire` datetime DEFAULT NULL , `order_responce` varchar(50) NOT NULL DEFAULT '' , `order_responce_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , `order_note` text , `order_lock` enum('0','1') NOT NULL DEFAULT '0' , `order_lock_time` timestamp NULL DEFAULT '0000-00-00 00:00:00' , `order_lock_admin_id` int(11) DEFAULT NULL , PRIMARY KEY (`order_id`) , UNIQUE KEY `order_payments` (`order_handling_id`,`order_payment_id`) , KEY `order_handling_id` (`order_handling_id`) , KEY `order_status` (`order_status`) , KEY `order_shipment_status` (`order_payment_status`) , KEY `order_payment_status` (`order_payment_status`) , KEY `order_timestamp` (`order_timestamp`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table order_status.CREATE TABLE `order_status` (`os_id` int(11) NOT NULL AUTO_INCREMENT , `os_order_id` int(11) NOT NULL DEFAULT '0' , `os_changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `os_status_from` varchar(50) DEFAULT NULL , `os_status_to` varchar(50) DEFAULT NULL , `os_changed_by` int(11) DEFAULT NULL , `os_action` varchar(50) DEFAULT NULL , `os_description` text , PRIMARY KEY (`os_id`) , KEY `os_order_id` (`os_order_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Organizer.CREATE TABLE `Organizer` (`organizer_name` varchar(100) NOT NULL DEFAULT '' , `organizer_address` varchar(100) NOT NULL DEFAULT '' , `organizer_plz` varchar(100) NOT NULL DEFAULT '' , `organizer_ort` varchar(100) NOT NULL DEFAULT '' , `organizer_state` varchar(50) DEFAULT NULL , `organizer_country` varchar(50) DEFAULT NULL , `organizer_email` varchar(100) NOT NULL DEFAULT '' , `organizer_fax` varchar(100) DEFAULT '' , `organizer_phone` varchar(100) DEFAULT '' , `organizer_place` varchar(100) NOT NULL DEFAULT '' , `organizer_currency` char(3) NOT NULL DEFAULT 'GBP' , `organizer_logo` varchar(100) DEFAULT NULL ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Ort.CREATE TABLE `Ort` (`ort_id` int(11) NOT NULL AUTO_INCREMENT , `ort_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `ort_name` varchar(100) NOT NULL DEFAULT '' , `ort_phone` varchar(50) DEFAULT NULL , `ort_plan_nr` varchar(100) DEFAULT '' , `ort_url` varchar(100) DEFAULT '' , `ort_image` varchar(100) DEFAULT NULL , `ort_address` varchar(75) NOT NULL DEFAULT '' , `ort_address1` varchar(75) DEFAULT '' , `ort_zip` varchar(20) NOT NULL DEFAULT '' , `ort_city` varchar(50) NOT NULL DEFAULT '' , `ort_state` varchar(50) DEFAULT '' , `ort_country` varchar(50) NOT NULL DEFAULT '' , `ort_pm` text , `ort_fax` varchar(50) DEFAULT NULL , PRIMARY KEY (`ort_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table PlaceMap2.CREATE TABLE `PlaceMap2` (`pm_id` int(11) NOT NULL AUTO_INCREMENT , `pm_ort_id` int(11) NOT NULL DEFAULT '0' , `pm_event_id` int(11) DEFAULT NULL , `pm_name` varchar(30) NOT NULL DEFAULT '' , `pm_image` varchar(100) DEFAULT NULL , PRIMARY KEY (`pm_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table PlaceMapPart.CREATE TABLE `PlaceMapPart` (`pmp_id` int(11) NOT NULL AUTO_INCREMENT , `pmp_pm_id` int(11) NOT NULL DEFAULT '0' , `pmp_ident` tinyint(4) NOT NULL DEFAULT '0' , `pmp_ort_id` int(11) DEFAULT NULL , `pmp_event_id` int(11) DEFAULT NULL , `pmp_name` varchar(30) NOT NULL DEFAULT '' , `pmp_width` int(11) NOT NULL DEFAULT '0' , `pmp_height` int(11) NOT NULL DEFAULT '0' , `pmp_scene` enum('north','east','south','west','center') NOT NULL DEFAULT 'north' , `pmp_shift` enum('0','1') NOT NULL DEFAULT '0' , `pmp_data` longtext NOT NULL , `pmp_data_orig` longtext , `pmp_expires` int(11) DEFAULT NULL , PRIMARY KEY (`pmp_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table PlaceMapZone.CREATE TABLE `PlaceMapZone` (`pmz_id` int(11) NOT NULL AUTO_INCREMENT , `pmz_pm_id` int(11) NOT NULL DEFAULT '0' , `pmz_ident` tinyint(4) NOT NULL DEFAULT '0' , `pmz_name` varchar(50) NOT NULL DEFAULT '' , `pmz_short_name` varchar(10) DEFAULT NULL , `pmz_color` varchar(10) DEFAULT NULL , PRIMARY KEY (`pmz_id`) , KEY `pm_id` (`pmz_pm_id`) , KEY `pmz_ident` (`pmz_ident`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Seat.CREATE TABLE `Seat` (`seat_id` int(11) NOT NULL AUTO_INCREMENT , `seat_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP , `seat_event_id` int(11) NOT NULL DEFAULT '0' , `seat_category_id` int(11) NOT NULL DEFAULT '0' , `seat_user_id` int(11) DEFAULT NULL , `seat_order_id` int(11) DEFAULT NULL , `seat_row_nr` varchar(5) DEFAULT NULL , `seat_zone_id` int(11) DEFAULT NULL , `seat_pmp_id` int(11) DEFAULT NULL , `seat_nr` int(11) NOT NULL DEFAULT '0' , `seat_ts` int(11) DEFAULT NULL , `seat_sid` varchar(32) DEFAULT NULL , `seat_price` decimal(10,2) DEFAULT NULL , `seat_discount_id` int(11) DEFAULT NULL , `seat_code` varchar(16) DEFAULT NULL , `seat_status` varchar(5) NOT NULL DEFAULT 'free' , `seat_sales_id` int(11) DEFAULT NULL , `seat_old_order_id` int(11) DEFAULT NULL , `seat_old_status` varchar(5) DEFAULT NULL , PRIMARY KEY (`seat_id`) , KEY `seat_event_id` (`seat_event_id`) , KEY `seat_category_id` (`seat_category_id`) , KEY `seat_order_id` (`seat_order_id`) , KEY `seat_ts` (`seat_ts`) , KEY `seat_status` (`seat_status`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table ShopConfig.CREATE TABLE `ShopConfig` (`shopconfig_lastrun` int(11) NOT NULL DEFAULT '0' , `shopconfig_lastrun_int` int(11) NOT NULL DEFAULT '10' , `shopconfig_restime` int(11) NOT NULL DEFAULT '0' , `shopconfig_restime_remind` int(11) NOT NULL DEFAULT '0' , `shopconfig_check_pos` enum('No','Yes') NOT NULL DEFAULT 'No' , `shopconfig_delunpaid` enum('Yes','No') NOT NULL DEFAULT 'Yes' , `shopconfig_delunpaid_pos` enum('Yes','No') NOT NULL DEFAULT 'Yes' , `shopconfig_posttocollect` varchar(20) NOT NULL DEFAULT '2' , `shopconfig_user_activate` tinyint(4) NOT NULL DEFAULT '0' , `shopconfig_maxres` int(11) NOT NULL DEFAULT '10' , `status` char(3) NOT NULL DEFAULT 'ON' , `res_delay` int(11) NOT NULL DEFAULT '660' , `cart_delay` int(11) NOT NULL DEFAULT '600' , `shopconfig_proxyaddress` varchar(300) NOT NULL DEFAULT '' , `shopconfig_proxyport` int(5) DEFAULT NULL , `shopconfig_ftusername` varchar(60) NOT NULL DEFAULT '' , `shopconfig_ftpassword` varchar(100) NOT NULL DEFAULT '' , `shopconfig_keepdetails` tinyint(1) NOT NULL DEFAULT '0' , `shopconfig_run_as_demo` int(3) NOT NULL DEFAULT '0' ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Template.CREATE TABLE `Template` (`template_id` int(11) NOT NULL AUTO_INCREMENT , `template_name` varchar(30) NOT NULL DEFAULT '' , `template_type` varchar(5) NOT NULL DEFAULT '' , `template_text` longtext NOT NULL , `template_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , `template_status` varchar(5) NOT NULL DEFAULT 'new' , PRIMARY KEY (`template_id`) , UNIQUE KEY `template_name` (`template_name`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table Payment_log.CREATE TABLE `Payment_log` (`payment_log_id` int(11) NOT NULL AUTO_INCREMENT , `payment_log_order_id` int(11) NOT NULL DEFAULT '0' , `payment_log_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , `payment_log_ipn_server_ip` varchar(255) NOT NULL DEFAULT '' , `payment_log_ipn_server_info` text NOT NULL , `payment_log_ipn_server_result` text NOT NULL , `payment_log_action` varchar(255) NOT NULL DEFAULT '' , `payment_log_blog` text NOT NULL , PRIMARY KEY (`payment_log_id`) , KEY `payment_log_order_id` (`payment_log_order_id`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected Create table sessions.CREATE TABLE `sessions` (`session_id` varchar(32) NOT NULL DEFAULT '' , `session_access` int(10) unsigned DEFAULT NULL , `session_data` longtext , PRIMARY KEY (`session_id`) , KEY `session_access` (`session_access`) ) ENGINE=InnoDB COLLATE = utf8_general_ci No database selected |