Skip to content

Commit 5185fa4

Browse files
committed
fix(be): migration for mysql
1 parent 31d667c commit 5185fa4

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

db/bolt/migration.go

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ func (d *BoltDb) ApplyMigration(m db.Migration) (err error) {
3737
switch m.Version {
3838
case "2.8.26":
3939
err = migration_2_8_28{migration{d.db}}.Apply()
40+
case "2.8.40":
41+
err = migration_2_8_40{migration{d.db}}.Apply()
4042
}
4143

4244
if err != nil {

db/sql/migrations/v2.8.39.sql

-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
alter table `task` change `build_task_id` `build_task_id_old` int;
2-
3-
alter table `task` add column `build_task_id` int;
4-
5-
update `task` set `build_task_id` = `build_task_id_old` where `build_task_id_old` is not null;
6-
7-
update `task` set `build_task_id_old` = null where `build_task_id_old` is not null;
8-
91
alter table `task`
102
add constraint `task_build_task_id_fk_y38rt`
113
foreign key (`build_task_id`) references `task` (`id`)
124
on delete set null;
135

14-
alter table `task` drop foreign key if exists `task_ibfk_2`;
15-
16-
alter table `task` drop column `build_task_id_old`;
17-
18-
19-
206

217
create table `project__template_backup_385025846` (
228
id int,

0 commit comments

Comments
 (0)