-
Notifications
You must be signed in to change notification settings - Fork 0
/
Database config
91 lines (82 loc) · 5.49 KB
/
Database config
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
use the following to access the database:
<?php
include "db_connection.php";
$conn = mysqli_connect($servername, $username, $password, $dbname);
?>
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| ToDoItems | item_ID | int | PK |
| ToDoItems | user_ID | int | |
| ToDoItems | title | varchar(255) | |
| ToDoItems | due_date | datetime | |
| ToDoItems | status | tinyint(1) | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| posts | post_ID | int | PK |
| posts | user_ID | int | |
| posts | topic_ID | int or null | |
| posts | title | varchar(255) | |
| posts | content | varchar(1000) | |
| posts | img_url | varchar(255) | |
| posts | Date | date | |
| posts | views | int | |
| posts | project_ID | int or null | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| project | project_ID | int | PK |
| project | team_leader | int | |
| project | project_title | varchar(255) | |
| project | due_date | date | |
| project | description | varchar(1000) | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| response | response_ID | int | PK |
| response | user_ID | int | |
| response | post_ID | int | |
| response | content | varchar(1000) | |
| response | Date | Date | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| tasks | task_ID | int | PK |
| tasks | user_ID | int | |
| tasks | project_ID | int | |
| tasks | title | varchar(255) | |
| tasks | description | varchar(1000) | |
| tasks | due_date | date | |
| tasks | est_hours | int | |
| tasks | progess | int | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| topics | topic_ID | int | PK |
| topics | title | varchar(255) | unique |
| topics | Date | date | |
| topics | views | int | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| users | user_ID | int | PK |
| users | email | varchar(255) | unique |
| users | encrypted_pass | varchar(255) | |
| users | icon | varchar(15) | |
| users | forename | varchar(255) | |
| users | surname | varchar(255) | |
| users | role | varchar(10) | |
+-------------------+----------------+---------------+---------------+
+-------------------+----------------+---------------+---------------+
| TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | CONSRAINTS |
+-------------------+----------------+---------------+---------------+
| activeInviteCodes | code | char(19) | PK |
| activeInviteCodes | expires | Date | |
+-------------------+----------------+---------------+---------------+