CREATE TABLE {table_prefix}CB_USER_PREFERENCES
(
    USER_ID     VARCHAR(128) NOT NULL,
    PREFERENCE_ID    VARCHAR(128)  NOT NULL,
    PREFERENCE_VALUE VARCHAR(1024),

    PRIMARY KEY (USER_ID, PREFERENCE_ID),
    FOREIGN KEY (USER_ID) REFERENCES {table_prefix}CB_USER (USER_ID) ON DELETE CASCADE
);


INSERT INTO {table_prefix}CB_USER_PREFERENCES (USER_ID, PREFERENCE_ID, PREFERENCE_VALUE)
SELECT USER_ID, PARAM_ID, PARAM_VALUE FROM {table_prefix}CB_USER_PARAMETERS;

DROP TABLE {table_prefix}CB_USER_PARAMETERS;

