The administration panel and web client for ParEdu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
3.7 KiB

3 years ago
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 15, 2021 at 01:55 PM
3 years ago
-- Server version: 10.3.27-MariaDB-0+deb10u1
-- PHP Version: 7.3.27-1~deb10u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `paredu_chat`
--
-- --------------------------------------------------------
--
-- Table structure for table `chats`
--
CREATE TABLE `chats` (
`chat_id` int(4) NOT NULL,
`chat_user_id` int(3) NOT NULL,
`chat_user2_id` int(3) NOT NULL,
`chat_message` text CHARACTER SET utf8 COLLATE utf8_hungarian_ci NOT NULL,
3 years ago
`chat_sent_by` int(1) NOT NULL,
`chat_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `chats_from`
--
CREATE TABLE `chats_from` (
`chat_id` int(4) NOT NULL,
`chat_user_id` int(4) NOT NULL,
`chat_user_from` int(4) NOT NULL,
`chat_type` varchar(10) NOT NULL DEFAULT 'received',
`chat_message` varchar(255) NOT NULL,
`chat_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `chats_to`
--
CREATE TABLE `chats_to` (
`chat_id` int(4) NOT NULL,
`chat_to_user_id` int(4) NOT NULL,
`chat_user_id_to` int(4) NOT NULL,
`chat_type` varchar(10) NOT NULL DEFAULT 'sent',
`chat_message` varchar(255) NOT NULL,
`chat_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `notifications`
--
CREATE TABLE `notifications` (
`id` int(20) NOT NULL,
`userid` bigint(20) NOT NULL,
`fromuserid` bigint(20) NOT NULL,
`unread` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
3 years ago
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(3) NOT NULL,
`user_name` varchar(50) NOT NULL,
`users_pass` varchar(255) NOT NULL,
`user_picture` varchar(100) NOT NULL,
`user_status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `chats`
--
ALTER TABLE `chats`
ADD PRIMARY KEY (`chat_id`);
--
-- Indexes for table `chats_from`
--
ALTER TABLE `chats_from`
ADD PRIMARY KEY (`chat_id`);
--
-- Indexes for table `chats_to`
--
ALTER TABLE `chats_to`
ADD PRIMARY KEY (`chat_id`);
--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
ADD PRIMARY KEY (`id`);
3 years ago
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `chats`
--
ALTER TABLE `chats`
MODIFY `chat_id` int(4) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chats_from`
--
ALTER TABLE `chats_from`
MODIFY `chat_id` int(4) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chats_to`
--
ALTER TABLE `chats_to`
MODIFY `chat_id` int(4) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
MODIFY `id` int(20) NOT NULL AUTO_INCREMENT;
3 years ago
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(3) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;