-- https://www.phpmyadmin.net/
--

START TRANSACTION;



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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `category_id` int(11) NOT NULL,
  `category_name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`category_id`, `category_name`) VALUES
(7, 'Programming'),
(8, 'General');

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

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `post_id` int(11) NOT NULL,
  `post_title` varchar(45) NOT NULL,
  `post_message` text NOT NULL,
  `date_posted` date NOT NULL,
  `account_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `posts`
--

INSERT INTO `posts` (`post_id`, `post_title`, `post_message`, `date_posted`, `account_id`, `category_id`) VALUES
(2, 'Hey, I am Mark!', 'I am Mark and I love programming.\r\n\r\nIf I tell you I’m the Chief Design Coordinator for my company, you’re likely to wonder, what exactly does he do? But if I say something like “I’m in charge of ensuring our product designs are compatible for use with our customers, while ensuring the team works productively to meet deadlines,” you’re more likely to get interested in knowing more about what I do.', '2021-08-17', 1, 7),
(4, 'Welcome to me!', 'Hello everyone! This is John. I am an entrepreneur here at Boston and has lately been learning programming.', '2021-08-22', 3, 7),
(5, 'Letter from the Admin', 'Today, me and my team here at Blogen, cordially welcomes you to this new and exciting way to connect with people from around the globe.', '2021-08-15', 1, 8);

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `user_id` int(11) NOT NULL,
  `first_name` varchar(45) NOT NULL,
  `last_name` varchar(45) NOT NULL,
  `address` varchar(45) NOT NULL,
  `contact_number` varchar(45) NOT NULL,
  `avatar` varchar(45) DEFAULT NULL,
  `bio` varchar(100) DEFAULT NULL,
  `account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`user_id`, `first_name`, `last_name`, `address`, `contact_number`, `avatar`, `bio`, `account_id`) VALUES
(1, 'Mark', 'Lee', 'California, USA', '78-785547-452', 'mark.jpeg', NULL, 1),
(3, 'John', 'Doe', 'Budapest, Hungary', '78987-787777', 'profile.jpg', NULL, 3);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`category_id`);

--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`post_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`user_id`);

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `post_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;

