000003_song_file_modified_date.up.sql 234 B

12345
  1. ALTER TABLE songs ADD modified_date bigint;
  2. UPDATE songs SET modified_date = 0;
  3. ALTER TABLE songs ALTER COLUMN modified_date SET NOT NULL;
  4. CREATE UNIQUE INDEX songs_file_time_unique ON songs (base_path, relative_path, modified_date)