Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phpMyAdmin SQL Dump
- -- version 4.7.2
- -- https://www.phpmyadmin.net/
- --
- -- Host: localhost
- -- Generation Time: Dec 20, 2017 at 08:55 AM
- -- Server version: 10.1.26-MariaDB
- -- PHP Version: 7.1.8
- 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: `SocialNet`
- --
- -- --------------------------------------------------------
- --
- -- Table structure for table `friend_requests`
- --
- CREATE TABLE `friend_requests` (
- `id` INT(11) NOT NULL,
- `user_to` VARCHAR(100) NOT NULL,
- `user_from` VARCHAR(100) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- -- --------------------------------------------------------
- --
- -- Table structure for table `likes`
- --
- CREATE TABLE `likes` (
- `id` INT(11) NOT NULL,
- `email` VARCHAR(100) NOT NULL,
- `post_id` INT(11) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `likes`
- --
- INSERT INTO `likes` (`id`, `email`, `post_id`) VALUES
- (35, 'islamelgaafary@gmail.com', 140),
- (36, 'iss@f.com', 140);
- -- --------------------------------------------------------
- --
- -- Table structure for table `notifications`
- --
- CREATE TABLE `notifications` (
- `id` INT(11) NOT NULL,
- `user_to` VARCHAR(100) NOT NULL,
- `user_from` VARCHAR(100) NOT NULL,
- `message` text NOT NULL,
- `link` VARCHAR(100) NOT NULL,
- `datetime` datetime NOT NULL,
- `opened` VARCHAR(3) NOT NULL,
- `viewed` VARCHAR(3) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `notifications`
- --
- INSERT INTO `notifications` (`id`, `user_to`, `user_from`, `message`, `link`, `datetime`, `opened`, `viewed`) VALUES
- (13, 'islamelgaafary@gmail.com', 'iss@f.com', 'Moaz Ezz liked your post', 'post.php?id=140', '2017-12-20 07:25:47', 'YES', 'YES');
- -- --------------------------------------------------------
- --
- -- Table structure for table `phoneNumber`
- --
- CREATE TABLE `phoneNumber` (
- `phoneNum` INT(11) NOT NULL,
- `user_email` VARCHAR(100) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- -- --------------------------------------------------------
- --
- -- Table structure for table `posts`
- --
- CREATE TABLE `posts` (
- `id` INT(11) NOT NULL,
- `body` text NOT NULL,
- `added_by` VARCHAR(60) NOT NULL,
- `user_to` VARCHAR(60) NOT NULL,
- `user_closed` VARCHAR(3) NOT NULL,
- `deleted` VARCHAR(3) NOT NULL,
- `likes` INT(11) NOT NULL,
- `date_added` datetime NOT NULL,
- `is_public` VARCHAR(3) NOT NULL,
- `image` VARCHAR(100) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `posts`
- --
- INSERT INTO `posts` (`id`, `body`, `added_by`, `user_to`, `user_closed`, `deleted`, `likes`, `date_added`, `is_public`, `image`) VALUES
- (141, 'gggg', 'islamelgaafary@gmail.com', 'none', 'NO', 'NO', 0, '2017-12-20 07:26:36', 'NO', ''),
- (142, 'hhhh', 'iss@f.com', 'none', 'NO', 'NO', 0, '2017-12-20 07:43:44', 'YES', '');
- -- --------------------------------------------------------
- --
- -- Table structure for table `users`
- --
- CREATE TABLE `users` (
- `email` VARCHAR(100) NOT NULL,
- `first_name` VARCHAR(20) NOT NULL,
- `last_name` VARCHAR(25) NOT NULL,
- `nickname` VARCHAR(100) NOT NULL,
- `password` VARCHAR(255) NOT NULL,
- `gender` VARCHAR(10) NOT NULL,
- `DoB` DATE NOT NULL,
- `profile_pic` VARCHAR(255) NOT NULL,
- `hometown` VARCHAR(100) NOT NULL,
- `marital_state` VARCHAR(10) NOT NULL,
- `about_me` text NOT NULL,
- `friend_array` text NOT NULL,
- `user_closed` VARCHAR(3) NOT NULL,
- `num_posts` INT(11) NOT NULL,
- `num_likes` INT(11) NOT NULL,
- `signup_date` DATE NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `users`
- --
- INSERT INTO `users` (`email`, `first_name`, `last_name`, `nickname`, `password`, `gender`, `DoB`, `profile_pic`, `hometown`, `marital_state`, `about_me`, `friend_array`, `user_closed`, `num_posts`, `num_likes`, `signup_date`) VALUES
- ('islamelgaafary@gmail.com', 'Islam', 'Elgaafary', 'Islam_nabil', '96e79218965eb72c92a549dd5a330112', 'Male', '2017-12-20', 'assets/images/profile_pics/defaults/boy_3.png', 'Alexandria', 'Single', 'gggg', ',', 'NO', 10, 2, '2017-12-20'),
- ('iss@f.com', 'Moaz', 'Ezz', 'M_e', '96e79218965eb72c92a549dd5a330112', 'Male', '2017-11-29', 'assets/images/profile_pics/defaults/boy_4.png', '', 'Married', 'ffff', ',', 'NO', 1, 0, '2017-12-20');
- --
- -- Indexes for dumped tables
- --
- --
- -- Indexes for table `friend_requests`
- --
- ALTER TABLE `friend_requests`
- ADD PRIMARY KEY (`id`),
- ADD KEY `user_from` (`user_from`),
- ADD KEY `user_to` (`user_to`);
- --
- -- Indexes for table `likes`
- --
- ALTER TABLE `likes`
- ADD PRIMARY KEY (`id`),
- ADD KEY `email` (`email`);
- --
- -- Indexes for table `notifications`
- --
- ALTER TABLE `notifications`
- ADD PRIMARY KEY (`id`),
- ADD KEY `user_from` (`user_from`),
- ADD KEY `user_to` (`user_to`);
- --
- -- Indexes for table `phoneNumber`
- --
- ALTER TABLE `phoneNumber`
- ADD PRIMARY KEY (`phoneNum`),
- ADD KEY `user_email` (`user_email`);
- --
- -- Indexes for table `posts`
- --
- ALTER TABLE `posts`
- ADD PRIMARY KEY (`id`),
- ADD KEY `added_by` (`added_by`);
- --
- -- Indexes for table `users`
- --
- ALTER TABLE `users`
- ADD PRIMARY KEY (`email`);
- --
- -- AUTO_INCREMENT for dumped tables
- --
- --
- -- AUTO_INCREMENT for table `friend_requests`
- --
- ALTER TABLE `friend_requests`
- MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
- --
- -- AUTO_INCREMENT for table `likes`
- --
- ALTER TABLE `likes`
- MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;
- --
- -- AUTO_INCREMENT for table `notifications`
- --
- ALTER TABLE `notifications`
- MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
- --
- -- AUTO_INCREMENT for table `posts`
- --
- ALTER TABLE `posts`
- MODIFY `id` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=143;
- --
- -- Constraints for dumped tables
- --
- --
- -- Constraints for table `friend_requests`
- --
- ALTER TABLE `friend_requests`
- ADD CONSTRAINT `friend_requests_ibfk_1` FOREIGN KEY (`user_from`) REFERENCES `users` (`email`),
- ADD CONSTRAINT `friend_requests_ibfk_2` FOREIGN KEY (`user_to`) REFERENCES `users` (`email`);
- --
- -- Constraints for table `likes`
- --
- ALTER TABLE `likes`
- ADD CONSTRAINT `likes_ibfk_1` FOREIGN KEY (`email`) REFERENCES `users` (`email`);
- --
- -- Constraints for table `notifications`
- --
- ALTER TABLE `notifications`
- ADD CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`user_from`) REFERENCES `users` (`email`),
- ADD CONSTRAINT `notifications_ibfk_2` FOREIGN KEY (`user_to`) REFERENCES `users` (`email`);
- --
- -- Constraints for table `phoneNumber`
- --
- ALTER TABLE `phoneNumber`
- ADD CONSTRAINT `phoneNumber_ibfk_1` FOREIGN KEY (`user_email`) REFERENCES `users` (`email`);
- --
- -- Constraints for table `posts`
- --
- ALTER TABLE `posts`
- ADD CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`added_by`) REFERENCES `users` (`email`);
- 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 */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement