mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-10 04:02:17 +00:00
12 lines
232 B
MySQL
12 lines
232 B
MySQL
|
START TRANSACTION;
|
||
|
|
||
|
ALTER TABLE playlist ADD tracks TEXT;
|
||
|
UPDATE playlist SET tracks = (
|
||
|
SELECT array_to_string(array_agg(track_id), ',')
|
||
|
FROM playlist_track
|
||
|
WHERE playlist_id = playlist.id);
|
||
|
DROP TABLE playlist_track;
|
||
|
|
||
|
COMMIT;
|
||
|
|