ALTER TABLE users ADD COLUMN first_opened_jamtrack_web_player TIMESTAMP;
ALTER TABLE jam_track_rights ADD COLUMN last_stem_id VARCHAR(64) REFERENCES jam_track_tracks(id) ON DELETE SET NULL;
ALTER TABLE jam_track_tracks ADD COLUMN url_mp3_48 VARCHAR;
ALTER TABLE jam_track_tracks ADD COLUMN md5_mp3_48 VARCHAR;
ALTER TABLE jam_track_tracks ADD COLUMN length_mp3_48 BIGINT;
ALTER TABLE jam_track_tracks ADD COLUMN url_aac_48 VARCHAR;
ALTER TABLE jam_track_tracks ADD COLUMN md5_aac_48 VARCHAR;
ALTER TABLE jam_track_tracks ADD COLUMN length_aac_48 BIGINT;

CREATE TABLE user_events (
  id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
  user_id VARCHAR(64) REFERENCES users(id) ON DELETE SET NULL,
  name VARCHAR(100) NOT NULL,
  detail JSON,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);