Add registration feature
This commit is contained in:
96
chatline.sql
Normal file
96
chatline.sql
Normal file
@@ -0,0 +1,96 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Generation Time: Feb 22, 2024 at 06:45 PM
|
||||
-- Server version: 10.4.32-MariaDB
|
||||
-- PHP Version: 8.2.12
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
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: `chatline`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
--
|
||||
-- Table structure for table `messages`
|
||||
--
|
||||
|
||||
CREATE TABLE `messages` (
|
||||
`msg_id` int(11) NOT NULL,
|
||||
`get_msg_id` int(255) NOT NULL,
|
||||
`post_msg_id` int(255) NOT NULL,
|
||||
`msg` varchar(1000) NOT NULL,
|
||||
`unique_id` int(255) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||
-- --------------------------------------------------------
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`user_id` int(11) NOT NULL,
|
||||
`unique_id` int(255) NOT NULL,
|
||||
`first_name` varchar(255) NOT NULL,
|
||||
`last_name` varchar(255) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`img` varchar(255) DEFAULT NULL,
|
||||
`status` varchar(255) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `messages`
|
||||
--
|
||||
ALTER TABLE `messages`
|
||||
ADD PRIMARY KEY (`msg_id`),
|
||||
ADD KEY `FOREIGN` (`unique_id`) USING BTREE;
|
||||
--
|
||||
-- Indexes for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD PRIMARY KEY (`user_id`),
|
||||
ADD KEY `UNIQUE_ID` (`unique_id`) USING BTREE;
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `messages`
|
||||
--
|
||||
ALTER TABLE `messages`
|
||||
MODIFY `msg_id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `messages`
|
||||
--
|
||||
ALTER TABLE `messages`
|
||||
ADD CONSTRAINT `FOREIGN_MESSAGES_USERS` FOREIGN KEY (`unique_id`) REFERENCES `users` (`unique_id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
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 */
|
||||
;
|
||||
Reference in New Issue
Block a user