-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
34 lines (30 loc) · 980 Bytes
/
Copy pathinit.sql
File metadata and controls
34 lines (30 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- CREATE DATABASE kimbledb;
USE kimbledb;
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
email varchar(100) UNIQUE NOT NULL,
firstName varchar(50),
lastName varchar(50),
password varchar(100) NOT NULL,
role varchar(50) DEFAULT "user",
pfp varchar(255) DEFAULT "https://github.com/shadcn.png",
otp varchar(6),
isEmailVerified int(1) DEFAULT 0,
isDeleted int(1) DEFAULT 0,
isActive int(1) DEFAULT 1,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE posts (
id INT PRIMARY KEY AUTO_INCREMENT,
user_id INT,
title varchar(100),
content text,
img varchar(255),
isPrivate int(1) DEFAULT 0,
isUpdated int(1) DEFAULT 0,
isDeleted int(1) DEFAULT 0,
updatedAt TIMESTAMP,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO users (email, firstName, lastName, password, role)
VALUES ('admin@kimble.com', 'Spike', 'Speigel', 'f30aa7a662c728b7407c54ae6bfd27d1', 'admin');