CREATE TABLE jam_track_sessions (
  id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
  jam_track_id VARCHAR(64) NOT NULL REFERENCES jam_tracks(id) ON DELETE CASCADE,
  session_type VARCHAR(10) NOT NULL,
  music_session_id VARCHAR(64) REFERENCES music_sessions(id) ON DELETE SET NULL,
  user_id VARCHAR(64) NOT NULL REFERENCES users(id),
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);