-
Notifications
You must be signed in to change notification settings - Fork 67
fix:update sql file,fix bug #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
44 changes: 22 additions & 22 deletions
44
...ces/sql/h2/create_model_ddl_2025_0717.sql → .../sql/h2/02_create_model_ddl_2025_0717.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| drop table if exists `t_model`; | ||
| create table `t_model` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name_cn` varchar(255) not null comment '中文名称', | ||
| `name_en` varchar(255) not null comment '英文名称', | ||
| `version` varchar(255) comment '版本', | ||
| `model_url` varchar(255) comment '模型url', | ||
| `parameters` varchar(2000) not null comment '字段参数', | ||
| `method` longtext comment '方法', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_model` (`name_en`,`version`) using btree | ||
| ) engine = innodb comment = '模型表'; | ||
| drop table if exists `t_model`; | ||
|
|
||
| create table `t_model` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name_cn` varchar(255) not null comment '中文名称', | ||
| `name_en` varchar(255) not null comment '英文名称', | ||
| `version` varchar(255) comment '版本', | ||
| `model_url` varchar(255) comment '模型url', | ||
| `parameters` varchar(2000) not null comment '字段参数', | ||
| `method` longtext comment '方法', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_model` (`name_en`,`version`) using btree | ||
| ) engine = innodb comment = '模型表'; |
114 changes: 57 additions & 57 deletions
114
.../mysql/create_resources_ddl_2025_0902.sql → .../h2/03_create_resources_ddl_2025_0902.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,58 @@ | ||
| drop table if exists `t_resource`; | ||
| create table `t_resource` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `app_id` int not null comment '关联appId', | ||
| `platform_id` int not null comment '关联设计器id', | ||
| `name` varchar(255) not null comment '名称', | ||
| `thumbnail_name` varchar(255) not null comment '缩略图名称', | ||
| `resource_url` varchar(255) comment '资源url', | ||
| `thumbnail_url` varchar(255) comment '缩略图url', | ||
| `category` varchar(255) not null comment '分类', | ||
| `description` varchar(2000) comment '描述', | ||
| `thumbnail_data` longtext comment '缩略图数据', | ||
| `resource_data` longtext comment '资源数据', | ||
| `public_status` int comment '公开状态:0,1,2', | ||
| `is_default` tinyint(1) comment '是否是默认', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_resource` (`category`,`name`, `tenant_id`) using btree | ||
| ) engine = innodb comment = '资源表'; | ||
| drop table if exists `t_resource_group`; | ||
| create table `t_resource_group` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name` varchar(255) not null comment '中文名称', | ||
| `app_id` int not null comment '关联appId', | ||
| `platform_id` int not null comment '关联设计器id', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_resource_group` (`name`,`app_id`, `tenant_id`) using btree | ||
| ) engine = innodb comment = '资源分组表'; | ||
| drop table if exists `r_resource_group_resource`; | ||
| CREATE TABLE `r_resource_group_resource` | ||
| ( | ||
| `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id', | ||
| `resource_id` int NOT NULL COMMENT '资源id', | ||
| `resource_group_id` int NOT NULL COMMENT '资源分组id', | ||
| PRIMARY KEY (`id`) USING BTREE, | ||
| UNIQUE KEY `u_idx_resource_group_resource` (`resource_id`,`resource_group_id`) USING BTREE | ||
| drop table if exists `t_resource`; | ||
|
|
||
| create table `t_resource` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `app_id` int not null comment '关联appId', | ||
| `platform_id` int not null comment '关联设计器id', | ||
| `name` varchar(255) not null comment '名称', | ||
| `thumbnail_name` varchar(255) not null comment '缩略图名称', | ||
| `resource_url` varchar(255) comment '资源url', | ||
| `thumbnail_url` varchar(255) comment '缩略图url', | ||
| `category` varchar(255) not null comment '分类', | ||
| `description` varchar(2000) comment '描述', | ||
| `thumbnail_data` longtext comment '缩略图数据', | ||
| `resource_data` longtext comment '资源数据', | ||
| `public_status` int comment '公开状态:0,1,2', | ||
| `is_default` tinyint(1) comment '是否是默认', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_resource` (`category`,`name`, `tenant_id`) using btree | ||
| ) engine = innodb comment = '资源表'; | ||
|
|
||
| drop table if exists `t_resource_group`; | ||
|
|
||
| create table `t_resource_group` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name` varchar(255) not null comment '中文名称', | ||
| `app_id` int not null comment '关联appId', | ||
| `platform_id` int not null comment '关联设计器id', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| `tenant_id` varchar(60) comment '租户id', | ||
| `renter_id` varchar(60) comment '业务租户id', | ||
| `site_id` varchar(60) comment '站点id,设计预留字段', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_resource_group` (`name`,`app_id`, `tenant_id`) using btree | ||
| ) engine = innodb comment = '资源分组表'; | ||
|
|
||
| drop table if exists `r_resource_group_resource`; | ||
|
|
||
| CREATE TABLE `r_resource_group_resource` | ||
| ( | ||
| `id` int NOT NULL AUTO_INCREMENT COMMENT '主键id', | ||
| `resource_id` int NOT NULL COMMENT '资源id', | ||
| `resource_group_id` int NOT NULL COMMENT '资源分组id', | ||
| PRIMARY KEY (`id`) USING BTREE, | ||
| UNIQUE KEY `u_idx_resource_group_resource` (`resource_id`,`resource_group_id`) USING BTREE | ||
| ) engine = innodb comment = '资源及资源分组关系表'; |
68 changes: 34 additions & 34 deletions
68
...create_permission_table_ddl_2025_1029.sql → ...create_permission_table_ddl_2025_1029.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,34 @@ | ||
| drop table if exists `t_permission_role`; | ||
| create table `t_permission_role` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name` varchar(255) not null comment '名称', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_permission_role` (`name`) using btree | ||
| ) engine = innodb comment = ''; | ||
| drop table if exists `r_auth_users_units_roles`; | ||
| create table `r_auth_users_units_roles` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `user_id` int not null comment '用户', | ||
| `unit_id` int not null comment '业务单元', | ||
| `unit_type` varchar(60) not null comment '业务单元类型', | ||
| `tenant_id` int not null comment '组织id', | ||
| `role_id` int not null comment '角色id', | ||
| `expired_time` timestamp comment '过期时间', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_auth_users_units_roles` (`user_id`, `unit_id`, `unit_type`) using btree | ||
| ) engine = innodb comment = ''; | ||
| drop table if exists `t_permission_role`; | ||
|
|
||
| create table `t_permission_role` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `name` varchar(255) not null comment '名称', | ||
| `description` varchar(2000) comment '描述', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_permission_role` (`name`) using btree | ||
| ) engine = innodb comment = ''; | ||
|
|
||
| drop table if exists `r_auth_users_units_roles`; | ||
|
|
||
| create table `r_auth_users_units_roles` | ||
| ( | ||
| `id` int not null auto_increment comment '主键id', | ||
| `user_id` int not null comment '用户', | ||
| `unit_id` int not null comment '业务单元', | ||
| `unit_type` varchar(60) not null comment '业务单元类型', | ||
| `tenant_id` int not null comment '组织id', | ||
| `role_id` int not null comment '角色id', | ||
| `expired_time` timestamp comment '过期时间', | ||
| `created_by` varchar(60) not null comment '创建人', | ||
| `created_time` timestamp not null default current_timestamp comment '创建时间', | ||
| `last_updated_by` varchar(60) not null comment '最后修改人', | ||
| `last_updated_time` timestamp not null default current_timestamp comment '更新时间', | ||
| primary key (`id`) using btree, | ||
| unique index `u_idx_auth_users_units_roles` (`user_id`, `unit_id`, `unit_type`) using btree | ||
| ) engine = innodb comment = ''; | ||
|
|
58 changes: 29 additions & 29 deletions
58
...esources/sql/h2/update_all_tables_ddl.sql → ...urces/sql/h2/05_update_all_tables_ddl.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,29 @@ | ||
| ALTER TABLE t_component DROP INDEX u_idx_component; | ||
| ALTER TABLE t_component ADD INDEX u_idx_component (tenant_id, name_en, version, library_id); | ||
| ALTER TABLE t_datasource DROP INDEX u_idx_datasource; | ||
| ALTER TABLE t_datasource ADD INDEX u_idx_datasource (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
| ALTER TABLE t_platform_history MODIFY sub_count int NULL; | ||
| ALTER TABLE t_platform_history MODIFY publish_url varchar(255) NULL; | ||
| ALTER TABLE t_app MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_app_extension MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_carriers_relation MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_group MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_business_category MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_component MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_component_library MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_datasource MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_i18n_entry MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_material MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_material_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page_template MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_platform MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_platform_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_task_record MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_user MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_component DROP INDEX u_idx_component; | ||
| ALTER TABLE t_component ADD INDEX u_idx_component (tenant_id, name_en, version, library_id); | ||
|
|
||
| ALTER TABLE t_datasource DROP INDEX u_idx_datasource; | ||
| ALTER TABLE t_datasource ADD INDEX u_idx_datasource (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
|
|
||
| ALTER TABLE t_platform_history MODIFY sub_count int NULL; | ||
| ALTER TABLE t_platform_history MODIFY publish_url varchar(255) NULL; | ||
|
|
||
| ALTER TABLE t_app MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_app_extension MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_carriers_relation MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_group MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_block_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_business_category MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_component MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_component_library MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_datasource MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_i18n_entry MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_material MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_material_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_page_template MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_platform MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_platform_history MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_task_record MODIFY tenant_id varchar(60) NULL; | ||
| ALTER TABLE t_user MODIFY tenant_id varchar(60) NULL; |
2 changes: 1 addition & 1 deletion
2
...h2/update_tables_ddl_v1.0.0_2025_0527.sql → ...06_update_tables_ddl_v1.0.0_2025_0527.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ALTER TABLE t_block_group DROP INDEX u_idx_block_group; | ||
| ALTER TABLE t_block_group DROP INDEX u_idx_block_group; | ||
| ALTER TABLE t_block_group ADD INDEX u_idx_block_group (`tenant_id`, `platform_id`, `name`, `app_id`); |
92 changes: 46 additions & 46 deletions
92
...ces/sql/h2/update_table_ddl_2025_1014.sql → .../sql/h2/07_update_table_ddl_2025_1014.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,46 @@ | ||
| ALTER TABLE t_app | ||
| ADD COLUMN is_template VARCHAR(100) AFTER is_default; | ||
| ALTER TABLE t_app | ||
| ADD COLUMN industry_id INT AFTER platform_id; | ||
| ALTER TABLE t_app | ||
| ADD COLUMN scene_id INT AFTER industry_id; | ||
|
|
||
| ALTER TABLE t_app DROP INDEX u_idx_app; | ||
| ALTER TABLE t_app | ||
| ADD INDEX u_idx_app (`tenant_id`, `platform_id`, `name`, `is_template`); | ||
|
|
||
| ALTER TABLE t_business_category | ||
| ADD COLUMN business_group VARCHAR(100) AFTER `name`; | ||
|
|
||
| ALTER TABLE t_datasource DROP INDEX u_idx_datasource; | ||
| ALTER TABLE t_datasource | ||
| ADD INDEX u_idx_datasource (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
|
|
||
| ALTER TABLE t_app_extension | ||
| ADD COLUMN platform_id INT AFTER app_id; | ||
| ALTER TABLE t_app_extension DROP INDEX u_idx_app_extension; | ||
| ALTER TABLE t_app_extension | ||
| ADD INDEX u_idx_app_extension (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
|
|
||
| ALTER TABLE t_model | ||
| ADD COLUMN app_id INT AFTER id; | ||
| ALTER TABLE t_model | ||
| ADD COLUMN platform_id INT AFTER app_id; | ||
| ALTER TABLE t_model DROP INDEX u_idx_model; | ||
| ALTER TABLE t_model | ||
| ADD INDEX u_idx_model (`tenant_id`, `platform_id`, `app_id`, `name_cn`,`version`); | ||
|
|
||
| ALTER TABLE t_user DROP COLUMN email, DROP COLUMN tenant_id, DROP COLUMN site_id,DROP COLUMN renter_id,DROP COLUMN created_by,DROP COLUMN last_updated_by; | ||
|
|
||
|
|
||
| ALTER TABLE t_user | ||
| ADD COLUMN password VARCHAR(200) AFTER username; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN email VARCHAR(200) AFTER password; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN salt VARCHAR(200) AFTER password; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN public_key VARCHAR(200) AFTER salt; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN private_key VARCHAR(200) AFTER public_key; | ||
|
|
||
| ALTER TABLE t_app | ||
| ADD COLUMN is_template VARCHAR(100) AFTER is_default; | ||
| ALTER TABLE t_app | ||
| ADD COLUMN industry_id INT AFTER platform_id; | ||
| ALTER TABLE t_app | ||
| ADD COLUMN scene_id INT AFTER industry_id; | ||
|
|
||
| ALTER TABLE t_app DROP INDEX u_idx_app; | ||
| ALTER TABLE t_app | ||
| ADD INDEX u_idx_app (`tenant_id`, `platform_id`, `name`, `is_template`); | ||
|
|
||
| ALTER TABLE t_business_category | ||
| ADD COLUMN business_group VARCHAR(100) AFTER `name`; | ||
|
|
||
| ALTER TABLE t_datasource DROP INDEX u_idx_datasource; | ||
| ALTER TABLE t_datasource | ||
| ADD INDEX u_idx_datasource (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
|
|
||
| ALTER TABLE t_app_extension | ||
| ADD COLUMN platform_id INT AFTER app_id; | ||
| ALTER TABLE t_app_extension DROP INDEX u_idx_app_extension; | ||
| ALTER TABLE t_app_extension | ||
| ADD INDEX u_idx_app_extension (`tenant_id`, `platform_id`, `name`, `app_id`); | ||
|
|
||
| ALTER TABLE t_model | ||
| ADD COLUMN app_id INT AFTER id; | ||
| ALTER TABLE t_model | ||
| ADD COLUMN platform_id INT AFTER app_id; | ||
| ALTER TABLE t_model DROP INDEX u_idx_model; | ||
| ALTER TABLE t_model | ||
| ADD INDEX u_idx_model (`tenant_id`, `platform_id`, `app_id`, `name_cn`,`version`); | ||
|
|
||
| ALTER TABLE t_user DROP COLUMN email, DROP COLUMN tenant_id, DROP COLUMN site_id,DROP COLUMN renter_id,DROP COLUMN created_by,DROP COLUMN last_updated_by; | ||
|
|
||
|
|
||
| ALTER TABLE t_user | ||
| ADD COLUMN password VARCHAR(200) AFTER username; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN email VARCHAR(200) AFTER password; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN salt VARCHAR(200) AFTER password; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN public_key VARCHAR(200) AFTER salt; | ||
| ALTER TABLE t_user | ||
| ADD COLUMN private_key VARCHAR(200) AFTER public_key; | ||
lu-yg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
2 changes: 1 addition & 1 deletion
2
...ces/sql/h2/update_table_ddl_2025_1217.sql → .../sql/h2/08_update_table_ddl_2025_1217.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ALTER TABLE t_resource | ||
| ALTER TABLE t_resource | ||
| ADD COLUMN hash VARCHAR(100) AFTER thumbnail_url; |
5 changes: 5 additions & 0 deletions
5
app/src/main/resources/sql/h2/09_update_table_ddl_2025_1229.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ALTER TABLE t_tenant DROP INDEX u_idx_tenant; | ||
| ALTER TABLE t_tenant ADD UNIQUE INDEX u_idx_tenant (`name_en`); | ||
|
|
||
| ALTER TABLE t_tenant MODIFY COLUMN name_en VARCHAR(255) NOT NULL COMMENT '组织英文名'; | ||
| ALTER TABLE t_tenant MODIFY COLUMN name_cn VARCHAR(255) NULL COMMENT '组织中文名'; | ||
lu-yg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.