-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
36 lines (32 loc) · 792 Bytes
/
Copy pathdatabase.sql
File metadata and controls
36 lines (32 loc) · 792 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
35
36
#DB - mysql
CREATE DATABASE IPproject;
CREATE TABLE data(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
user_id int,
drawing_id int,
command LONGTEXT,
deleted int,
linked_to int
);
CREATE TABLE drawing(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name LONGTEXT,
owner_id int,
description LONGTEXT,
allowed_users LONGTEXT,
deleted int
);
CREATE TABLE user(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
username LONGTEXT NOT NULL,
password LONGTEXT NOT NULL,
deleted int
);
CREATE TABLE allowed_users(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
drawing_id int,
user_id int,
deleted int
);
#test,test
INSERT INTO user (username, password, deleted ) VALUES ("test","$2y$10$x89D0NaocUnJNcPAuL1vb.RZZAg1xRAC43hKQsUZ2lsdV/.XbJ7Yu",0);