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

START TRANSACTION;



--
-- Database: `ikeaplay_2023`
--

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

--
-- Table structure for table `gallery`
--

CREATE TABLE `gallery` (
  `ID` int UNSIGNED NOT NULL,
  `PostDate` datetime DEFAULT NULL,
  `LastUpdate` datetime DEFAULT NULL,
  `Data` text COLLATE utf8mb4_unicode_ci,
  `SearchKey` text COLLATE utf8mb4_unicode_ci,
  `UploadID` bigint UNSIGNED NOT NULL DEFAULT '0',
  `FilePath` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `Likes` int UNSIGNED NOT NULL DEFAULT '0',
  `Visible` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `Final` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `ItemPosition` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `gallery_votes`
--

CREATE TABLE `gallery_votes` (
  `ID` int UNSIGNED NOT NULL,
  `PostDate` datetime DEFAULT NULL,
  `ItemID` int UNSIGNED DEFAULT '0',
  `FacebookID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `FacebookName` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `IP` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `UserInfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `VoteKey` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


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

--
-- Table structure for table `phase`
--

CREATE TABLE `phase` (
  `ID` int UNSIGNED NOT NULL,
  `PhaseDate` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `phase`
--

INSERT INTO `phase` (`ID`, `PhaseDate`) VALUES
(1, '2024-11-19 00:00:00'),
(2, '2024-12-08 00:00:00'),
(3, '2024-12-14 00:00:00');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `gallery`
--
ALTER TABLE `gallery`
  ADD PRIMARY KEY (`ID`);

--
-- Indexes for table `gallery_votes`
--
ALTER TABLE `gallery_votes`
  ADD PRIMARY KEY (`ID`),
  ADD UNIQUE KEY `VoteKey` (`VoteKey`) USING BTREE,
  ADD KEY `ItemID` (`ItemID`);

--
-- Indexes for table `phase`
--
ALTER TABLE `phase`
  ADD PRIMARY KEY (`ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `gallery`
--
ALTER TABLE `gallery`
  MODIFY `ID` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=957;

--
-- AUTO_INCREMENT for table `gallery_votes`
--
ALTER TABLE `gallery_votes`
  MODIFY `ID` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

