diff --git a/full database.sql b/full database.sql index 631ae07..8885fbf 100644 --- a/full database.sql +++ b/full database.sql @@ -12,22 +12,17 @@ SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; - +-- Setting character set /*!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: `db168432_sql` --- -- -------------------------------------------------------- --- -- Table structure for table `comments` --- - CREATE TABLE `comments` ( `ID` int(11) NOT NULL, `post_id` int(11) DEFAULT NULL, @@ -36,22 +31,16 @@ CREATE TABLE `comments` ( `comment_content` longtext NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `comments` --- - INSERT INTO `comments` (`ID`, `post_id`, `comment_author`, `comment_author_email`, `comment_content`) VALUES -(1, 6, 'jessica', 'jessica@gmail.com', 'Great post! '), -(2, 2, 'mike', 'mike@gmail.com', 'Love it! Write more like this. '), -(3, 2, 'jamie', 'jamie@gmail.com', 'I disagree! '), +(1, 6, 'jessica', 'jessica@gmail.com', 'Great post!'), +(2, 2, 'mike', 'mike@gmail.com', 'Love it! Write more like this.'), +(3, 2, 'jamie', 'jamie@gmail.com', 'I disagree!'), (4, 2, 'caleb', 'caleb@gmail.com', 'First'); -- -------------------------------------------------------- --- -- Table structure for table `facebook_users` --- - CREATE TABLE `facebook_users` ( `ID` int(11) NOT NULL, `name` varchar(256) CHARACTER SET utf8 NOT NULL, @@ -59,20 +48,14 @@ CREATE TABLE `facebook_users` ( `password` varchar(256) CHARACTER SET utf8 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `facebook_users` --- - INSERT INTO `facebook_users` (`ID`, `name`, `email`, `password`) VALUES (1, 'chris', 'chris@gmail.com', '1234'), (3, 'mattan', 'mattan@gmail.com', '1234e41234e41234e41234e41234e4'); -- -------------------------------------------------------- --- -- Table structure for table `posts` --- - CREATE TABLE `posts` ( `ID` int(11) NOT NULL, `post_author` varchar(255) NOT NULL, @@ -81,25 +64,19 @@ CREATE TABLE `posts` ( `post_status` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `posts` --- - INSERT INTO `posts` (`ID`, `post_author`, `post_content`, `post_title`, `post_status`) VALUES -(1, '2', 'What is the toughest part of learning to code?\r\n\r\nSTAYING MOTIVATED.\r\n\r\nBack in 2002, I was a music major with no desire to become a computer programmer. I quit three times. I was still totally determined to make a website for my band ', '6 Reasons Why You’ll Never Learn to Code', 'published'), -(2, '2', 'Python is one of the best coding languages to learn to boost your career. Many of the biggest websites in the world use Python, and there are plenty of jobs you can get with Python skills. But what do you need to know BEFORE you start?\r\n\r\nWith over four years experience teaching Python, we here at One Month have noticed 6 things that all new Python students should know before getting started.', 'What You Need to Know Before You Learn Python', 'published'), -(3, '5', '
On Monday 63 Columbia University MBAs used One Month to build a website in under one hour. Did you know you could build a website from scratch in just one hour?
\r\n\r\n\r\n[caption id=\"attachment_3031\" align=\"alignnone\" width=\"1002\"] MBA students learning to code HTML & CSS[/caption]\r\nJoel Califa ...', 'How I Got Hired at GitHub', 'draft'), +(5, '4', 'Welcome to the Learn to Code podcast ...', 'How I Learned to Code in 6 Months', 'draft'); -- -------------------------------------------------------- --- -- Table structure for table `products` --- - CREATE TABLE `products` ( `ID` int(11) NOT NULL, `book_name` varchar(256) NOT NULL, @@ -108,10 +85,7 @@ CREATE TABLE `products` ( `quantity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `products` --- - INSERT INTO `products` (`ID`, `book_name`, `author`, `price`, `quantity`) VALUES (1, 'The Overstory', 'Richard Powers', '11.99', 4), (2, 'Sapiens', 'Yuval Noah Harari', '18.99', 14), @@ -127,10 +101,7 @@ INSERT INTO `products` (`ID`, `book_name`, `author`, `price`, `quantity`) VALUES -- -------------------------------------------------------- --- -- Table structure for table `purchases` --- - CREATE TABLE `purchases` ( `ID` int(11) NOT NULL, `user_id` int(11) NOT NULL, @@ -138,10 +109,7 @@ CREATE TABLE `purchases` ( `quantity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `purchases` --- - INSERT INTO `purchases` (`ID`, `user_id`, `product_id`, `quantity`) VALUES (1, 2, 2, 1), (2, 2, 1, 1), @@ -150,10 +118,7 @@ INSERT INTO `purchases` (`ID`, `user_id`, `product_id`, `quantity`) VALUES -- -------------------------------------------------------- --- -- Table structure for table `states` --- - CREATE TABLE `states` ( `id` int(11) NOT NULL, `state` varchar(255) NOT NULL, @@ -162,10 +127,7 @@ CREATE TABLE `states` ( `image` varchar(256) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `states` --- - INSERT INTO `states` (`id`, `state`, `drink`, `year`, `image`) VALUES (1, 'Alabama', 'Whiskey', 2004, 'whiskey.jpeg'), (2, 'Arizona', 'Lemonade', 2019, 'lemonade.jpg'), @@ -194,134 +156,95 @@ INSERT INTO `states` (`id`, `state`, `drink`, `year`, `image`) VALUES (28, 'Tennessee', 'Milk', 2009, 'milk.jpeg'), (29, 'Vermont', 'Milk', 1983, 'milk.jpeg'), (30, 'Virginia', 'Milk', 1982, 'milk.jpeg'), -(31, 'Wisconsin ', 'Milk', 1987, 'milk.jpeg'), -(32, 'New Jersey', 'Vodka', 2018, 'vodka.jpg'), -(33, 'California', 'Wine', 1950, ''); +(31, 'West Virginia', 'Milk', 1998, 'milk.jpeg'), +(32, 'Wisconsin', 'Milk', 1987, 'milk.jpeg'); -- -------------------------------------------------------- --- -- Table structure for table `users` --- - CREATE TABLE `users` ( - `ID` bigint(20) UNSIGNED NOT NULL, - `user_login` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL, - `user_pass` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL, - `user_nicename` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL, - `user_email` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; + `ID` int(11) NOT NULL, + `first_name` varchar(256) NOT NULL, + `last_name` varchar(256) NOT NULL, + `email` varchar(256) NOT NULL, + `password` varchar(256) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; --- -- Dumping data for table `users` --- +INSERT INTO `users` (`ID`, `first_name`, `last_name`, `email`, `password`) VALUES +(1, 'Chris', 'North', 'chris@gmail.com', '1234'), +(2, 'Mattan', 'Griffel', 'mattan@gmail.com', '1234'), +(3, 'Daniel', 'Aronoff', 'daniel@gmail.com', '1234'), +(4, 'Avidor', 'Klein', 'avidor@gmail.com', '1234'), +(5, 'Bob', 'Smith', 'bob@gmail.com', '1234'), +(6, 'Matt', 'Lane', 'matt@gmail.com', '1234'), +(7, 'Jim', 'Crowley', 'jim@gmail.com', '1234'); -INSERT INTO `users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`) VALUES -(1, 'jsmith', '0832c1202da8d382318e329a7c133ea0', 'jared', 'jsmith@gmail.com'), -(2, 'castig', '$P$Bq.VlkwuWFu4BIktX.olT2eyCVwXv1.', 'chris', 'chris@gmail.com'), -(3, 'mattan', '5f4dcc3b5aa765d61d8327deb882cf99', 'mattan', 'mattan@gmail.com'), -(4, 'zuck', 'f9cQUpQ34BIVlkkt', 'mark', 'zuck@gmail.com'), -(5, 'jamie', 'lH0WC8yboMj/bjt4f3Km/', 'jamie', 'jamie@gmail.com'), -(6, 'wei', '$P$B20YTQ5OHff9cQUpQ4fKNBecfZnYGy.', 'wei', 'wei@gmail.com'), -(7, 'caraadams', 'A7Cx1zD7cbeCWaAOUu/eYyiRU1', 'cara', 'caraadams@gmail.com'), -(8, 'ophir', '$P$B0YwbF0r8r7CHEq/yzhRoc6BolpKeD.', 'ophir', 'ophir@hotmail.com'); +-- -------------------------------------------------------- --- -- Indexes for dumped tables --- - -- -- Indexes for table `comments` --- ALTER TABLE `comments` ADD PRIMARY KEY (`ID`); --- -- Indexes for table `facebook_users` --- ALTER TABLE `facebook_users` ADD PRIMARY KEY (`ID`); --- -- Indexes for table `posts` --- ALTER TABLE `posts` ADD PRIMARY KEY (`ID`); --- -- Indexes for table `products` --- ALTER TABLE `products` ADD PRIMARY KEY (`ID`); --- -- Indexes for table `purchases` --- ALTER TABLE `purchases` ADD PRIMARY KEY (`ID`); --- -- Indexes for table `states` --- ALTER TABLE `states` ADD PRIMARY KEY (`id`); --- -- Indexes for table `users` --- ALTER TABLE `users` - ADD PRIMARY KEY (`ID`), - ADD KEY `user_login_key` (`user_login`), - ADD KEY `user_nicename` (`user_nicename`), - ADD KEY `user_email` (`user_email`); + ADD PRIMARY KEY (`ID`); --- -- AUTO_INCREMENT for dumped tables --- - -- -- AUTO_INCREMENT for table `comments` --- ALTER TABLE `comments` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; --- -- AUTO_INCREMENT for table `facebook_users` --- ALTER TABLE `facebook_users` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; --- -- AUTO_INCREMENT for table `posts` --- ALTER TABLE `posts` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; --- -- AUTO_INCREMENT for table `products` --- ALTER TABLE `products` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; --- -- AUTO_INCREMENT for table `purchases` --- ALTER TABLE `purchases` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; --- -- AUTO_INCREMENT for table `states` --- ALTER TABLE `states` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33; --- -- AUTO_INCREMENT for table `users` --- ALTER TABLE `users` - MODIFY `ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; -COMMIT; + MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; +-- Setting back character set and collation /*!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;