create table user_unique_login
(
    id             bigint auto_increment
        primary key,
    user_id        varchar(64)  not null,
    product_code   varchar(255) not null,
    login_strategy varchar(64)  not null,
    login_domain   varchar(255) not null,
    tid            varchar(32)  not null,
    create_time    datetime     not null,
    update_time    datetime     not null
);

create index user_id_product_code_index
    on user_unique_login (user_id, product_code, login_strategy, login_domain);


alter table product
    add unique_login_strategy varchar(64) default 'APP_UNIQUE' not null after remark;