ALTER TABLE jam_sessions DROP COLUMN public;

-- rename 'name' to 'description' to match product specification terminology
ALTER TABLE jam_sessions RENAME name TO description;

-- rename jam_sessions to more generic 'music_sessions'
ALTER TABLE jam_sessions RENAME TO music_sessions;

-- get rid of early version of member table
DROP TABLE jam_session_members;

-- one row is created per connected client
CREATE TABLE music_session_clients (
        id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
        user_id VARCHAR(64) REFERENCES users(id) ON DELETE CASCADE,
        music_session_id VARCHAR(64) REFERENCES music_sessions(id) ON DELETE CASCADE,
	ip_address VARCHAR(64) NOT NULL,
        created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
        updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);



