3
3
-- https://www.phpmyadmin.net/
4
4
--
5
5
-- Host: 127.0.0.1
6
- -- Generation Time: Aug 24, 2024 at 03:07 PM
6
+ -- Generation Time: Apr 12, 2025 at 12:53 PM
7
7
-- Server version: 10.4.32-MariaDB
8
8
-- PHP Version: 8.2.12
9
9
@@ -23,6 +23,36 @@ SET time_zone = "+00:00";
23
23
24
24
-- --------------------------------------------------------
25
25
26
+ --
27
+ -- Table structure for table `comments`
28
+ --
29
+
30
+ CREATE TABLE `comments ` (
31
+ ` commentID` int (11 ) NOT NULL ,
32
+ ` authorID` int (11 ) NOT NULL ,
33
+ ` postID` int (11 ) NOT NULL ,
34
+ ` comment` varchar (500 ) NOT NULL ,
35
+ ` creationDate` varchar (25 ) NOT NULL
36
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_general_ci;
37
+
38
+ -- --------------------------------------------------------
39
+
40
+ --
41
+ -- Table structure for table `likes`
42
+ --
43
+
44
+ CREATE TABLE `likes ` (
45
+ ` likeId` int (11 ) NOT NULL ,
46
+ ` userId` int (11 ) NOT NULL ,
47
+ ` postID` int (11 ) NOT NULL ,
48
+ ` username` varchar (32 ) NOT NULL ,
49
+ ` avatarURL` varchar (500 ) NOT NULL ,
50
+ ` creationDate` varchar (25 ) NOT NULL ,
51
+ ` location` varchar (80 ) NOT NULL
52
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_general_ci;
53
+
54
+ -- --------------------------------------------------------
55
+
26
56
--
27
57
-- Table structure for table `notifications`
28
58
--
@@ -37,13 +67,39 @@ CREATE TABLE `notifications` (
37
67
` sender_username` varchar (50 ) NOT NULL ,
38
68
` message` varchar (100 ) NOT NULL ,
39
69
` creationDate` varchar (25 ) NOT NULL ,
40
- ` avatarURL` varchar (500 ) NOT NULL ,
70
+ ` avatarURL` varchar (500 ) NOT NULL DEFAULT ' http://vine-x.bag-xml.com/static/pfps/7bc6c93de0ad70ec51a42f5c6277be2496d4c90b0a4ad00b726f096d0e661797.png ' ,
41
71
` thumbnailURL` varchar (500 ) NOT NULL ,
42
72
` adminMessage` tinyint (1 ) NOT NULL
43
73
) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_general_ci;
44
74
45
75
-- --------------------------------------------------------
46
76
77
+ --
78
+ -- Table structure for table `posts`
79
+ --
80
+
81
+ CREATE TABLE `posts ` (
82
+ ` postID` int (11 ) NOT NULL ,
83
+ ` authorID` int (11 ) NOT NULL ,
84
+ ` authorName` varchar (50 ) NOT NULL ,
85
+ ` thumbnailURL` varchar (500 ) NOT NULL ,
86
+ ` videoURL` varchar (500 ) NOT NULL ,
87
+ ` location` varchar (120 ) NOT NULL ,
88
+ ` description` varchar (80 ) NOT NULL ,
89
+ ` creationDate` varchar (25 ) NOT NULL ,
90
+ ` comments` longtext NOT NULL ,
91
+ ` likes` longtext NOT NULL ,
92
+ ` tags` longtext NOT NULL ,
93
+ ` usersWhoLiked` longtext NOT NULL DEFAULT ' {"liked": []}' ,
94
+ ` verified` tinyint (1 ) NOT NULL DEFAULT 0 ,
95
+ ` promoted` tinyint (1 ) NOT NULL DEFAULT 0 ,
96
+ ` postToFacebook` int (11 ) NOT NULL DEFAULT 0 ,
97
+ ` foursquareVenueID` int (11 ) NOT NULL DEFAULT 0 ,
98
+ ` authorPFP` longtext NOT NULL
99
+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_general_ci;
100
+
101
+ -- --------------------------------------------------------
102
+
47
103
--
48
104
-- Table structure for table `users`
49
105
--
@@ -56,7 +112,7 @@ CREATE TABLE `users` (
56
112
` phoneNumber` int (11 ) NOT NULL ,
57
113
` username` varchar (32 ) NOT NULL ,
58
114
` description` varchar (60 ) NOT NULL ,
59
- ` pfp` varchar ( 500 ) NOT NULL ,
115
+ ` pfp` longtext NOT NULL ,
60
116
` location` varchar (32 ) NOT NULL ,
61
117
` followingCount` int (11 ) NOT NULL ,
62
118
` followerCount` int (11 ) NOT NULL ,
@@ -65,23 +121,44 @@ CREATE TABLE `users` (
65
121
` blocked` longtext NOT NULL DEFAULT ' {"blocked":[]}' ,
66
122
` following` longtext NOT NULL DEFAULT ' {"following":[]}' ,
67
123
` followers` longtext NOT NULL DEFAULT ' {"followers":[]}' ,
124
+ ` likedPosts` longtext NOT NULL DEFAULT ' {"liked_posts":[]}' ,
125
+ ` pending_notifications_count` int (11 ) NOT NULL DEFAULT 0 ,
68
126
` promo` tinyint (1 ) NOT NULL DEFAULT 0 ,
69
127
` isPrivate` tinyint (1 ) NOT NULL DEFAULT 0 ,
70
128
` isVerified` tinyint (1 ) NOT NULL DEFAULT 0 ,
71
129
` isAdmin` tinyint (1 ) NOT NULL DEFAULT 0 ,
130
+ ` AdminKey` varchar (12 ) NOT NULL ,
72
131
` isBanned` tinyint (1 ) NOT NULL DEFAULT 0
73
132
) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_general_ci;
74
133
75
134
--
76
135
-- Indexes for dumped tables
77
136
--
78
137
138
+ --
139
+ -- Indexes for table `comments`
140
+ --
141
+ ALTER TABLE ` comments`
142
+ ADD PRIMARY KEY (` commentID` );
143
+
144
+ --
145
+ -- Indexes for table `likes`
146
+ --
147
+ ALTER TABLE ` likes`
148
+ ADD PRIMARY KEY (` likeId` );
149
+
79
150
--
80
151
-- Indexes for table `notifications`
81
152
--
82
153
ALTER TABLE ` notifications`
83
154
ADD PRIMARY KEY (` notificationID` );
84
155
156
+ --
157
+ -- Indexes for table `posts`
158
+ --
159
+ ALTER TABLE ` posts`
160
+ ADD PRIMARY KEY (` postID` );
161
+
85
162
--
86
163
-- Indexes for table `users`
87
164
--
@@ -92,12 +169,30 @@ ALTER TABLE `users`
92
169
-- AUTO_INCREMENT for dumped tables
93
170
--
94
171
172
+ --
173
+ -- AUTO_INCREMENT for table `comments`
174
+ --
175
+ ALTER TABLE ` comments`
176
+ MODIFY ` commentID` int (11 ) NOT NULL AUTO_INCREMENT;
177
+
178
+ --
179
+ -- AUTO_INCREMENT for table `likes`
180
+ --
181
+ ALTER TABLE ` likes`
182
+ MODIFY ` likeId` int (11 ) NOT NULL AUTO_INCREMENT;
183
+
95
184
--
96
185
-- AUTO_INCREMENT for table `notifications`
97
186
--
98
187
ALTER TABLE ` notifications`
99
188
MODIFY ` notificationID` int (11 ) NOT NULL AUTO_INCREMENT;
100
189
190
+ --
191
+ -- AUTO_INCREMENT for table `posts`
192
+ --
193
+ ALTER TABLE ` posts`
194
+ MODIFY ` postID` int (11 ) NOT NULL AUTO_INCREMENT;
195
+
101
196
--
102
197
-- AUTO_INCREMENT for table `users`
103
198
--
0 commit comments