Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created September 27, 2021 16:04
Show Gist options
  • Save hieptl/1e0ba9f9f0a3824bd7c012053eb42a44 to your computer and use it in GitHub Desktop.
Save hieptl/1e0ba9f9f0a3824bd7c012053eb42a44 to your computer and use it in GitHub Desktop.
SQL - Tinder Clone
DROP DATABASE IF EXISTS tinder_clone;
CREATE DATABASE tinder_clone;
USE tinder_clone;
CREATE TABLE user_account (
id BIGINT NOT NULL AUTO_INCREMENT,
user_email VARCHAR(255) NOT NULL,
user_password VARCHAR(255) NOT NULL,
user_full_name VARCHAR(255) NOT NULL,
user_age INT NOT NULL,
user_avatar VARCHAR(255) NOT NULL,
user_gender VARCHAR(255) NOT NULL,
user_cometchat_uid VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE match_request (
id BIGINT NOT NULL AUTO_INCREMENT,
match_request_from VARCHAR(255) NOT NULL,
match_request_to VARCHAR(255) NOT NULL,
match_request_sender VARCHAR(255) NOT NULL,
match_request_receiver VARCHAR(255) NOT NULL,
match_request_status INT NOT NULL,
created_date DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
accepted_date DATETIME NULL,
PRIMARY KEY (id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment