DO $$
    BEGIN
        BEGIN
            ALTER TABLE jam_tracks ADD COLUMN duration INTEGER;
        EXCEPTION
            WHEN duplicate_column THEN RAISE NOTICE 'column duration already exists in jam_tracks.';
        END;
    END;
$$  LANGUAGE plpgsql;