<commit_before>-- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 22, 2017 at 11:59 AM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.0.8

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: `id3635174_event_db`
--

--
-- Dumping data for table `card_load`
--

INSERT INTO `card_load` (`card_id`, `card_code`, `card_amount`, `card_active`, `account_id`) VALUES
(1, '123', 100, 0x01, 1),
(2, '2525', 250, 0x01, 1);

--
-- Dumping data for table `event_info`
--

INSERT INTO `event_info` (`event_id`, `event_date_start`, `event_date_end`, `no_tickets_total`, `event_status`, `event_name`, `event_details`, `event_category`, `event_venue`, `date_created`, `color`, `user_id`) VALUES
(1, '2017-10-03 00:00:00', '2017-10-19 00:00:00', 500, 'Approved', 'Event', 'Details', 'Other', 'Venue\r\n', '2017-10-02 11:48:13', 'red', 1),
(5, '2017-10-10 04:03:06', '2017-10-18 00:00:00', 100, 'Pending', 'USC Wariors Night', 'USC Warioirs Night is a event oraganized by USC Supreme Student council that aims to ignite the Carolinian Spirit and foster comrandery amongst the Carlonian ', 'Concert', 'USC TC', '2017-10-02 15:29:08', NULL, 1),
(10, '2017-10-05 00:00:00', '2017-10-08 00:00:00', 70, 'Approved', 'Software Engineering Presentation', 'Presentation of the whole system.', 'Meeting', 'USC TC', '2017-10-02 16:13:44', NULL, 1),
(11, '2017-10-15 00:00:00', '2017-10-19 00:00:00', 43, 'Approved', 'IAFT Open House', 'Tour on the school and film short classes.', '', 'IAFT, Lapu Lapu', '2017-10-02 16:19:02', NULL, 2),
(12, '2017-10-18 00:00:00', '2017-10-20 00:00:00', 20, 'Pending', 'Event Name', 'Description', 'Conference', 'USC TC', '2017-10-03 16:07:35', NULL, 1),
(13, '2017-10-29 12:00:00', '2017-10-31 12:00:00', 3, 'Pending', 'Software Engineering Integration', 'Integration of the Daily Events System.', '', 'Mabolo, Cebu City', '2017-10-03 19:05:29', NULL, 3);

--
-- Dumping data for table `ticket`
--

INSERT INTO `ticket` (`ticket_id`, `date_sold`, `user_id`, `ticket_type_id`) VALUES
(1, '2017-10-02 05:47:58', 1, 1),
(2, '2017-10-02 05:47:58', 1, 1),
(3, '2017-10-02 05:47:58', 1, 1),
(4, '2017-10-02 14:26:32', 2, 12),
(5, '2017-10-02 14:26:32', 2, 12),
(6, '2017-10-02 14:26:32', 2, 12),
(7, '2017-10-02 14:26:32', 2, 12),
(8, '2017-10-02 14:26:32', 2, 12),
(9, '2017-10-03 14:57:41', 1, 12),
(10, '2017-10-03 17:13:22', 3, 1);

--
-- Dumping data for table `ticket_type`
--

INSERT INTO `ticket_type` (`ticket_type_id`, `ticket_name`, `price`, `ticket_count`, `event_id`) VALUES
(1, 'Premium', 100, 0, 1),
(2, 'Premium', 150, 50, 5),
(3, 'Silver', 100, 30, 5),
(4, 'Gold', 50, 20, 5),
(8, 'Premium', 500, 10, 10),
(9, 'Silver', 500, 10, 10),
(10, 'Gold', 600, 50, 10),
(11, 'Premium', 100, 10, 11),
(12, 'Gold', 350, 3, 11),
(13, 'Silver', 50, 30, 11),
(14, 'Type', 600, 20, 12),
(15, 'VIP', 1000, 3, 13);

--
-- Dumping data for table `user_account`
--

INSERT INTO `user_account` (`account_id`, `user_name`, `password`, `user_type`, `user_status`, `first_name`, `last_name`, `middle_initial`, `email`, `birthdate`, `gender`, `contact_no`, `load_amt`, `date_account_created`) VALUES
(1, 'user', 'user', 'Admin', 'Active', 'user', 'user', 'u', '<EMAIL>', '1998-08-17', 'Male', '09254815798', 650, '2017-08-16 00:00:00'),
(2, 'test', '123qweasd', 'Regular', 'Banned', 'testq', 'test', 't', '<EMAIL>', '0000-00-00', 'Female', '0999999999', 0, '2017-10-02 01:21:21'),
(3, 'sep', 'sep', 'Regular', 'Active', 'Joseph', 'Entoma', 'A', '<EMAIL>', '2017-10-17', 'Other', '09323770455', 0, '2017-10-02 14:36:56'),
(4, 'bis', 'bis', 'Regular', 'Active', 'Yves', 'Libunao', 'O', '<EMAIL>', '2017-10-02', 'Female', '0923585454', 0, '2017-10-02 15:02:09');

--
-- Dumping data for table `user_event_preference`
--

INSERT INTO `user_event_preference` (`user_event_preference_id`, `preference_date`, `user_id`, `event_id`) VALUES
(1, '2017-10-02 05:13:22', 1, 1);

/*!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 */;
<commit_msg>update sql<commit_after>-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 22, 2017 at 12:13 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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: `event_db`
--

-- --------------------------------------------------------

--
-- Table structure for table `card_load`
--

CREATE TABLE `card_load` (
  `card_id` int(11) NOT NULL,
  `card_code` varchar(20) NOT NULL,
  `card_amount` float NOT NULL DEFAULT '0',
  `card_active` binary(1) NOT NULL,
  `date_claimed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `account_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `event_info`
--

CREATE TABLE `event_info` (
  `event_id` int(11) NOT NULL,
  `event_date_start` datetime NOT NULL,
  `event_date_end` datetime NOT NULL,
  `no_tickets_total` int(11) NOT NULL,
  `event_status` enum('Pending','Approved','Rejected') DEFAULT NULL,
  `event_name` varchar(50) NOT NULL,
  `event_details` text,
  `event_category` enum('Appearance','Attraction','Retreat','Training','Concert','Conference','Convention','Gala','Festival','Competition','Meeting','Party','Rally','Screening','Seminar','Tour','Other') NOT NULL,
  `event_venue` text NOT NULL,
  `event_isActive` tinyint(1) NOT NULL DEFAULT '1',
  `event_picture` text NOT NULL,
  `date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `color` varchar(7) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ticket`
--

CREATE TABLE `ticket` (
  `ticket_id` int(11) NOT NULL,
  `date_sold` datetime NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `ticket_type_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ticket_type`
--

CREATE TABLE `ticket_type` (
  `ticket_type_id` int(11) NOT NULL,
  `ticket_name` varchar(50) DEFAULT NULL,
  `price` float NOT NULL,
  `ticket_count` int(11) NOT NULL,
  `event_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `user_account`
--

CREATE TABLE `user_account` (
  `account_id` int(11) NOT NULL,
  `user_name` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `user_type` enum('Regular','Admin','Superadmin','') NOT NULL,
  `upgradedBy` int(11) NOT NULL,
  `user_status` enum('Active','Banned','Deleted') NOT NULL DEFAULT 'Active',
  `first_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `middle_initial` char(1) DEFAULT NULL,
  `user_imgpath` varchar(260) NOT NULL,
  `email` varchar(100) NOT NULL,
  `birthdate` date NOT NULL,
  `gender` enum('Male','Female','Other') NOT NULL,
  `contact_no` varchar(16) DEFAULT NULL,
  `load_amt` float NOT NULL DEFAULT '0',
  `date_account_created` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `user_event_preference`
--

CREATE TABLE `user_event_preference` (
  `user_event_preference_id` int(11) NOT NULL,
  `preference_date` datetime NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `event_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `card_load`
--
ALTER TABLE `card_load`
  ADD PRIMARY KEY (`card_id`),
  ADD KEY `card_load_fk` (`account_id`);

--
-- Indexes for table `event_info`
--
ALTER TABLE `event_info`
  ADD PRIMARY KEY (`event_id`),
  ADD KEY `event_info_fk` (`user_id`);

--
-- Indexes for table `ticket`
--
ALTER TABLE `ticket`
  ADD PRIMARY KEY (`ticket_id`),
  ADD KEY `ticket_fk1` (`user_id`),
  ADD KEY `ticket_fk2` (`ticket_type_id`);

--
-- Indexes for table `ticket_type`
--
ALTER TABLE `ticket_type`
  ADD PRIMARY KEY (`ticket_type_id`),
  ADD KEY `ticket_type_fk1` (`event_id`);

--
-- Indexes for table `user_account`
--
ALTER TABLE `user_account`
  ADD PRIMARY KEY (`account_id`),
  ADD UNIQUE KEY `user_name` (`user_name`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indexes for table `user_event_preference`
--
ALTER TABLE `user_event_preference`
  ADD PRIMARY KEY (`user_event_preference_id`),
  ADD KEY `user_event_preference_fk1` (`user_id`),
  ADD KEY `user_event_preference_fk2` (`event_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `card_load`
--
ALTER TABLE `card_load`
  MODIFY `card_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `event_info`
--
ALTER TABLE `event_info`
  MODIFY `event_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `ticket`
--
ALTER TABLE `ticket`
  MODIFY `ticket_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `ticket_type`
--
ALTER TABLE `ticket_type`
  MODIFY `ticket_type_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `user_account`
--
ALTER TABLE `user_account`
  MODIFY `account_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `user_event_preference`
--
ALTER TABLE `user_event_preference`
  MODIFY `user_event_preference_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `card_load`
--
ALTER TABLE `card_load`
  ADD CONSTRAINT `card_load_fk` FOREIGN KEY (`account_id`) REFERENCES `user_account` (`account_id`);

--
-- Constraints for table `event_info`
--
ALTER TABLE `event_info`
  ADD CONSTRAINT `event_info_fk` FOREIGN KEY (`user_id`) REFERENCES `user_account` (`account_id`);

--
-- Constraints for table `ticket`
--
ALTER TABLE `ticket`
  ADD CONSTRAINT `ticket_fk1` FOREIGN KEY (`user_id`) REFERENCES `user_account` (`account_id`),
  ADD CONSTRAINT `ticket_fk2` FOREIGN KEY (`ticket_type_id`) REFERENCES `ticket_type` (`ticket_type_id`);

--
-- Constraints for table `ticket_type`
--
ALTER TABLE `ticket_type`
  ADD CONSTRAINT `ticket_type_fk1` FOREIGN KEY (`event_id`) REFERENCES `event_info` (`event_id`);

--
-- Constraints for table `user_event_preference`
--
ALTER TABLE `user_event_preference`
  ADD CONSTRAINT `user_event_preference_fk1` FOREIGN KEY (`user_id`) REFERENCES `user_account` (`account_id`),
  ADD CONSTRAINT `user_event_preference_fk2` FOREIGN KEY (`event_id`) REFERENCES `event_info` (`event_id`);
COMMIT;

/*!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 */;

{'fraction_non_alphanumeric': 0.20048921114702542, 'fraction_numerical': 0.08438892286188521, 'mean_word_length': 4.213114754098361, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7503771', 'n_tokens_mistral': 5104, 'n_tokens_neox': 4317, 'n_words': 1107}