Add queries table Add index to notecolours.substring Set up cascading deletes for queries, playdates and playlist_rows