DROP table music_sessions_plays;
DROP table recordings_plays;

CREATE TABLE playable_plays(
    id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
    playable_id VARCHAR(64) NOT NULL,
    playable_type VARCHAR(128) NOT NULL,
    player_id VARCHAR(64) REFERENCES users(id) ON DELETE CASCADE,
    claimed_recording_id VARCHAR(64) REFERENCES claimed_recordings(id),
    ip_address inet,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
