Update database

This commit is contained in:
2025-08-24 21:58:57 -07:00
parent a503506f3b
commit 42490aaf37

View File

@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 25, 2025 at 02:54 AM
-- Generation Time: Aug 25, 2025 at 06:58 AM
-- Server version: 11.8.3-MariaDB-ubu2404
-- PHP Version: 8.1.33
@@ -23,6 +23,20 @@ SET time_zone = "+00:00";
-- --------------------------------------------------------
--
-- Table structure for table `chatroom_reports`
--
CREATE TABLE `chatroom_reports` (
`id` int(11) NOT NULL,
`chatId` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`reason` text NOT NULL,
`timestamp` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPRESSED;
-- --------------------------------------------------------
--
-- Table structure for table `chats`
--
@@ -104,6 +118,14 @@ CREATE TABLE `users` (
-- Indexes for dumped tables
--
--
-- Indexes for table `chatroom_reports`
--
ALTER TABLE `chatroom_reports`
ADD PRIMARY KEY (`id`),
ADD KEY `userId` (`userId`),
ADD KEY `chatId` (`chatId`);
--
-- Indexes for table `chats`
--
@@ -134,6 +156,12 @@ ALTER TABLE `users`
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `chatroom_reports`
--
ALTER TABLE `chatroom_reports`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chats`
--
@@ -162,6 +190,13 @@ ALTER TABLE `users`
-- Constraints for dumped tables
--
--
-- Constraints for table `chatroom_reports`
--
ALTER TABLE `chatroom_reports`
ADD CONSTRAINT `chatId` FOREIGN KEY (`chatId`) REFERENCES `chats` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `chats`
--