ALTER TABLE rhnContentSource ADD COLUMN IF NOT EXISTS download_strategy_id NUMERIC NOT NULL DEFAULT 500;

CREATE TABLE IF NOT EXISTS
ContentSourceDownloadStrategy
(
        id              NUMERIC NOT NULL
                        constraint dls_id_pk primary key,
        label           VARCHAR(32) NOT NULL
                        constraint dls_label_uq unique,
        created         TIMESTAMPTZ default(current_timestamp) NOT NULL,
        modified        TIMESTAMPTZ default(current_timestamp) NOT NULL
);

INSERT INTO ContentSourceDownloadStrategy (id, label) values
(500, 'full') ON CONFLICT DO NOTHING;
INSERT INTO ContentSourceDownloadStrategy(id, label) values
(600, 'external') ON CONFLICT DO NOTHING;
INSERT INTO ContentSourceDownloadStrategy(id, label) values
(700, 'proxy') ON CONFLICT DO NOTHING;
INSERT INTO ContentSourceDownloadStrategy(id, label) values
(800, 'proxycache') ON CONFLICT DO NOTHING;

