|
7 | 7 |
|
8 | 8 | -- Delete subscriptions for services other than YOUTUBE(0), BILIBILI(5), NICONICO(6) |
9 | 9 | -- This will cascade to feed_group_subscription_join if foreign keys are set up |
10 | | -DELETE FROM subscriptions WHERE service_id NOT IN (0, 5, 6); |
11 | | - |
12 | | --- Delete remote_playlists for non-target services |
13 | | -DELETE FROM remote_playlists WHERE service_id NOT IN (0, 5, 6); |
14 | | - |
15 | | --- Delete streams for non-target services |
16 | | --- This will cascade to: |
17 | | --- - playlist_stream_join (if foreign keys are set up) |
18 | | --- - stream_history (if foreign keys are set up) |
19 | | --- - stream_state (if foreign keys are set up) |
20 | | -DELETE FROM streams WHERE service_id NOT IN (0, 5, 6); |
| 10 | +-- DELETE FROM subscriptions WHERE service_id NOT IN (0, 5, 6); |
| 11 | +-- |
| 12 | +-- -- Delete remote_playlists for non-target services |
| 13 | +-- DELETE FROM remote_playlists WHERE service_id NOT IN (0, 5, 6); |
| 14 | +-- |
| 15 | +-- -- Delete streams for non-target services |
| 16 | +-- -- This will cascade to: |
| 17 | +-- -- - playlist_stream_join (if foreign keys are set up) |
| 18 | +-- -- - stream_history (if foreign keys are set up) |
| 19 | +-- -- - stream_state (if foreign keys are set up) |
| 20 | +-- DELETE FROM streams WHERE service_id NOT IN (0, 5, 6); |
21 | 21 |
|
22 | 22 | -- ============================================================ |
23 | 23 | -- Part 0.2: Service ID Mapping (excluding search_history) |
|
0 commit comments