-- https://www.phpmyadmin.net/
--
-- 생성 시간: 25-03-12 10:48
-- 서버 버전: 10.11.6-MariaDB-0+deb12u1
-- PHP 버전: 8.2.20

START TRANSACTION;



--
-- 데이터베이스: `gallery_db`
--

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

--
-- 테이블 구조 `album_list`
--

CREATE TABLE `album_list` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `user_id` int(30) NOT NULL,
  `delete_f` tinyint(1) NOT NULL DEFAULT 0,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 테이블의 덤프 데이터 `album_list`
--

INSERT INTO `album_list` (`id`, `name`, `user_id`, `delete_f`, `date_created`, `date_updated`) VALUES
(1, 'Avatars', 1, 0, '2021-08-09 10:23:50', '2021-08-09 13:09:06'),
(2, 'Sample Images', 1, 0, '2021-08-09 11:13:16', '2021-08-09 14:12:19'),
(4, 'Album 104', 1, 0, '2021-08-09 11:16:33', NULL),
(5, 'Album 105', 1, 0, '2021-08-09 11:16:41', '2021-08-09 16:15:17'),
(8, 'test', 1, 0, '2025-02-22 07:52:02', NULL);

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

--
-- 테이블 구조 `images`
--

CREATE TABLE `images` (
  `id` int(30) NOT NULL,
  `album_id` int(30) NOT NULL,
  `original_name` text NOT NULL,
  `path_name` text NOT NULL,
  `delete_f` tinyint(1) NOT NULL DEFAULT 0,
  `user_id` int(30) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 테이블의 덤프 데이터 `images`
--

INSERT INTO `images` (`id`, `album_id`, `original_name`, `path_name`, `delete_f`, `user_id`, `date_created`, `date_updated`) VALUES
(1, 1, 'avatar101.jpg', 'uploads/user_1/album_1/1628486640.jpg', 0, 1, '2021-08-09 13:24:44', '2021-08-09 13:45:39'),
(2, 1, 'avatar.jpg', 'uploads/user_1/album_1/1628486640_1.jpg', 0, 1, '2021-08-09 13:24:44', NULL),
(3, 1, 'avatar102.png', 'uploads/user_1/album_1/1628486640.png', 0, 1, '2021-08-09 13:24:44', '2021-08-09 13:45:50'),
(4, 2, '1.jpg', 'uploads/user_1/album_2/1628489520.jpg', 0, 1, '2021-08-09 14:12:31', NULL),
(5, 2, 'test.jpg', 'uploads/user_1/album_2/1628489520_1.jpg', 0, 1, '2021-08-09 14:12:31', '2021-08-09 14:13:46'),
(6, 2, '1850646 - Copy.jpg', 'uploads/user_1/album_2/1628489520_2.jpg', 0, 1, '2021-08-09 14:12:31', NULL);

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

--
-- 테이블 구조 `system_info`
--

CREATE TABLE `system_info` (
  `id` int(30) NOT NULL,
  `meta_field` text NOT NULL,
  `meta_value` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 테이블의 덤프 데이터 `system_info`
--

INSERT INTO `system_info` (`id`, `meta_field`, `meta_value`) VALUES
(1, 'name', 'Simple Image Gallery System'),
(6, 'short_name', 'Gallery'),
(11, 'logo', 'uploads/gallery.png'),
(13, 'user_avatar', 'uploads/user_avatar.jpg');

--
-- 덤프된 테이블의 인덱스
--

--
-- 테이블의 인덱스 `album_list`
--
ALTER TABLE `album_list`
  ADD PRIMARY KEY (`id`);

--
-- 테이블의 인덱스 `images`
--
ALTER TABLE `images`
  ADD PRIMARY KEY (`id`);

--
-- 테이블의 인덱스 `system_info`
--
ALTER TABLE `system_info`
  ADD PRIMARY KEY (`id`);

--
-- 덤프된 테이블의 AUTO_INCREMENT
--

--
-- 테이블의 AUTO_INCREMENT `album_list`
--
ALTER TABLE `album_list`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- 테이블의 AUTO_INCREMENT `images`
--
ALTER TABLE `images`
  MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- 테이블의 AUTO_INCREMENT `system_info`
--
ALTER TABLE `system_info`
  MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
COMMIT;

