Skip to content

Commit ce2dcf0

Browse files
committed
update db after a while
1 parent ee4fa52 commit ce2dcf0

File tree

1 file changed

+98
-3
lines changed

1 file changed

+98
-3
lines changed

vinexdb.sql

Lines changed: 98 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- https://www.phpmyadmin.net/
44
--
55
-- 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
77
-- Server version: 10.4.32-MariaDB
88
-- PHP Version: 8.2.12
99

@@ -23,6 +23,36 @@ SET time_zone = "+00:00";
2323

2424
-- --------------------------------------------------------
2525

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+
2656
--
2757
-- Table structure for table `notifications`
2858
--
@@ -37,13 +67,39 @@ CREATE TABLE `notifications` (
3767
`sender_username` varchar(50) NOT NULL,
3868
`message` varchar(100) NOT NULL,
3969
`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',
4171
`thumbnailURL` varchar(500) NOT NULL,
4272
`adminMessage` tinyint(1) NOT NULL
4373
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
4474

4575
-- --------------------------------------------------------
4676

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+
47103
--
48104
-- Table structure for table `users`
49105
--
@@ -56,7 +112,7 @@ CREATE TABLE `users` (
56112
`phoneNumber` int(11) NOT NULL,
57113
`username` varchar(32) NOT NULL,
58114
`description` varchar(60) NOT NULL,
59-
`pfp` varchar(500) NOT NULL,
115+
`pfp` longtext NOT NULL,
60116
`location` varchar(32) NOT NULL,
61117
`followingCount` int(11) NOT NULL,
62118
`followerCount` int(11) NOT NULL,
@@ -65,23 +121,44 @@ CREATE TABLE `users` (
65121
`blocked` longtext NOT NULL DEFAULT '{"blocked":[]}',
66122
`following` longtext NOT NULL DEFAULT '{"following":[]}',
67123
`followers` longtext NOT NULL DEFAULT '{"followers":[]}',
124+
`likedPosts` longtext NOT NULL DEFAULT '{"liked_posts":[]}',
125+
`pending_notifications_count` int(11) NOT NULL DEFAULT 0,
68126
`promo` tinyint(1) NOT NULL DEFAULT 0,
69127
`isPrivate` tinyint(1) NOT NULL DEFAULT 0,
70128
`isVerified` tinyint(1) NOT NULL DEFAULT 0,
71129
`isAdmin` tinyint(1) NOT NULL DEFAULT 0,
130+
`AdminKey` varchar(12) NOT NULL,
72131
`isBanned` tinyint(1) NOT NULL DEFAULT 0
73132
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
74133

75134
--
76135
-- Indexes for dumped tables
77136
--
78137

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+
79150
--
80151
-- Indexes for table `notifications`
81152
--
82153
ALTER TABLE `notifications`
83154
ADD PRIMARY KEY (`notificationID`);
84155

156+
--
157+
-- Indexes for table `posts`
158+
--
159+
ALTER TABLE `posts`
160+
ADD PRIMARY KEY (`postID`);
161+
85162
--
86163
-- Indexes for table `users`
87164
--
@@ -92,12 +169,30 @@ ALTER TABLE `users`
92169
-- AUTO_INCREMENT for dumped tables
93170
--
94171

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+
95184
--
96185
-- AUTO_INCREMENT for table `notifications`
97186
--
98187
ALTER TABLE `notifications`
99188
MODIFY `notificationID` int(11) NOT NULL AUTO_INCREMENT;
100189

190+
--
191+
-- AUTO_INCREMENT for table `posts`
192+
--
193+
ALTER TABLE `posts`
194+
MODIFY `postID` int(11) NOT NULL AUTO_INCREMENT;
195+
101196
--
102197
-- AUTO_INCREMENT for table `users`
103198
--

0 commit comments

Comments
 (0)