· 7 years ago · Jan 21, 2019, 02:16 PM
1CREATE TABLE `ps_edgeusertut` (
2 `ID` int(11) unsigned NOT NULL,
3 `ut_userid` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
4 `ut_tutorial` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
5 `ut_faved` tinyint(1) DEFAULT NULL,
6 `ut_datefaved` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
7 `ut_unlocked` tinyint(1) DEFAULT NULL,
8 `ut_dateunlocked` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
9 `ut_watched` tinyint(1) DEFAULT NULL,
10 `ut_watch_history` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
11 PRIMARY KEY (`ID`)
12) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
13
14-- custom table to store unlinked (ie not wordpress meta data) meta data about a user and tutorial
15-- if no record exists user has not interacted with the tutorial
16-- record created/updated if user Favourites the tutorial (ut_faved, ut_datefaved are set accordingly)
17-- record created/updated if user watches tutorial (ut_watched, ut_watch_history are set accordingly)
18-- ut_watched is either NULL or TRUE, ut_watched_history is a serialised array of dates the tutorial was watched