Commit b2fc05fc by mercymodest

feat: add yago 2.0.0 update sql

parent 63e17e52
CREATE TABLE `api_client_credentials`
CREATE TABLE `api_client_credentials`
(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '唯一标识符',
`grant_type` TINYINT NOT NULL COMMENT '授权类型,0:表示cp',
`client_id` CHAR(32) NOT NULL COMMENT '客户端ID',
`client_secret` VARCHAR(150) NOT NULL COMMENT '客户端秘钥',
`type` TINYINT DEFAULT 0 COMMENT '令牌类型,0:表示bearer',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='API客户端认证信息表';
create index idx_client_id
on api_client_credentials (client_id);
alter table user
add member_registration_source tinyint(1) default 0 null comment '会员注册来源 0:拉伽 1:ClassPath小程序 default 0';
alter table user
alter column birthday_type set default 0;
alter table store_course
add course_id VARCHAR(50) null comment '课程ID 用于和 ClassPass 交互使用';
create index idx_course_id
on store_course (course_id);
alter table store_schedules
add cp_size int default 0 null comment '开放CP固定席位(人)' after size;
alter table user_card_subscribe_logs
add reservation_source tinyint(1) default 0 null comment '预约来源 0:拉伽 1:ClassPass小程序 默认:0';
alter table user_card_subscribe_logs
add reservation_tag tinyint(1) default 0 null comment '预约标签 0:无标签 1:CP 默认:0';
create index idx_schedules_uuid_course_uuid
on user_card_subscribe_logs (schedules_uuid, course_uuid);
create index idx_status_reservation_source
on user_card_subscribe_logs (status, reservation_source);
create index idx_course_uuid
on store_schedules (course_uuid);
create index idx_staff_uuid
on store_schedules (staff_uuid);
alter table user
modify phone varchar(50) not null comment '手机号';
alter table user
add cp_user_id varchar(100) null comment 'cp user id (class pass user id)';
create index idx_cp_user_id
on user (cp_user_id);
create index idx_phone
on user (phone);
alter table user_card_subscribe_logs
add cp_booking_id varchar(100) null comment 'class pass booking id';
create index idx_cp_booking_id
on user_card_subscribe_logs (cp_booking_id);
alter table user_card_subscribe_logs
modify user_phone varchar(50) null comment '用户手机号';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment