App
App
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 27, 2024 at 01:26 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30
--
-- Database: `seoul_app`
--
CREATE DATABASE IF NOT EXISTS `seoul_app` DEFAULT CHARACTER SET utf8mb4
COLLATE utf8mb4_general_ci;
USE `seoul_app`;
-- --------------------------------------------------------
--
-- Table structure for table `bookmarks`
--
--
-- Dumping data for table `bookmarks`
--
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
--
-- Dumping data for table `users`
--
-- --------------------------------------------------------
--
-- Table structure for table `vacation_places`
--
--
-- Dumping data for table `vacation_places`
--
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bookmarks`
--
ALTER TABLE `bookmarks`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `user_id` (`user_id`,`place_id`),
ADD KEY `place_id` (`place_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email` (`email`);
--
-- Indexes for table `vacation_places`
--
ALTER TABLE `vacation_places`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bookmarks`
--
ALTER TABLE `bookmarks`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `vacation_places`
--
ALTER TABLE `vacation_places`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `bookmarks`
--
ALTER TABLE `bookmarks`
ADD CONSTRAINT `bookmarks_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users`
(`id`),
ADD CONSTRAINT `bookmarks_ibfk_2` FOREIGN KEY (`place_id`) REFERENCES
`vacation_places` (`id`);
COMMIT;