Closed iCantSneed closed 5 months ago
Migrations:
INSERT INTO stream (date, id) SELECT date(convert_tz(created, '+00:00', '-06:00')) as date, floor(rand() * 0x10000000) as id FROM `superchat` GROUP by date
UPDATE superchat A set A.prev_id = (select B.id from superchat B where B.date < A.date order by B.date DESC limit 1)
The Stream table will aid in quickly retrieving superchats belonging to a specific stream. It should contain these columns:
The Superchat table needs to be altered to add a stream column and make it indexable.
The cached superchats should contain the Stream id and, more importantly, the prev id, so it can be delivered to the UI. The UI can use the prev id to retrieve superchats for the previous stream, the previous stream can provide the stream id prior to that one, and so on.
To be completed after #50.