This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
-- SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
|
||||
create table `app_user_identity` (
|
||||
`id` char(36) primary key,
|
||||
`version` integer not null,
|
||||
`created_at` datetime(6) not null,
|
||||
`updated_at` datetime(6) not null,
|
||||
`issuer` varchar(255) not null,
|
||||
`subject` varchar(255) not null,
|
||||
`user_id` char(36) not null,
|
||||
`migration_id` varchar(255)
|
||||
) engine=InnoDB default charset=utf8mb4;
|
||||
|
||||
alter table `app_user_identity` add constraint `app_user_identity_issuer_subject_key` unique (`issuer`, `subject`);
|
||||
|
||||
create index `app_user_identity_user_id_idx` on `app_user_identity` (`user_id`);
|
||||
|
||||
insert into `app_user_identity` (
|
||||
`id`,
|
||||
`version`,
|
||||
`created_at`,
|
||||
`updated_at`,
|
||||
`issuer`,
|
||||
`subject`,
|
||||
`user_id`,
|
||||
`migration_id`
|
||||
)
|
||||
select
|
||||
`id`,
|
||||
1,
|
||||
`created_at`,
|
||||
`updated_at`,
|
||||
`issuer`,
|
||||
`subject`,
|
||||
`id`,
|
||||
'legacy-users-issuer-subject-v1'
|
||||
from `users`;
|
||||
Reference in New Issue
Block a user