-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(migration): migrate unsupported task to custom (#709)
Because - we have not support `TASK_IMAGE_TO_IMAGE` in the new AI Task standard This commit - migrate unsupported task to `TASK_CUSTOM
- Loading branch information
Showing
5 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,7 +1,7 @@ | ||
BEGIN; | ||
|
||
comment on column model_trigger.requester_uid is null; | ||
COMMENT ON COLUMN model_trigger.requester_uid IS NULL; | ||
|
||
alter table model_trigger drop column runner_uid; | ||
ALTER TABLE model_trigger DROP COLUMN runner_uid; | ||
|
||
COMMIT; |
This file contains 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,12 +1,12 @@ | ||
BEGIN; | ||
|
||
alter table model_trigger | ||
add runner_uid uuid; | ||
ALTER TABLE model_trigger | ||
ADD runner_uid uuid; | ||
|
||
comment on column model_trigger.requester_uid is 'run by namespace, which is the credit owner'; | ||
COMMENT ON COLUMN model_trigger.requester_uid IS 'run by namespace, which is the credit owner'; | ||
|
||
update model_trigger | ||
set runner_uid = requester_uid | ||
where runner_uid is null; | ||
UPDATE model_trigger | ||
SET runner_uid = requester_uid | ||
WHERE runner_uid IS NULL; | ||
|
||
COMMIT; |
5 changes: 5 additions & 0 deletions
5
pkg/db/migration/000012_migrate_unsupported_task.down copy.sql
This file contains 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 @@ | ||
BEGIN; | ||
|
||
UPDATE model SET task = 'TASK_CUSTOM' WHERE task = 'TASK_IMAGE_TO_IMAGE'; | ||
|
||
COMMIT; |
This file contains 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 @@ | ||
BEGIN; | ||
|
||
UPDATE model SET task = 'TASK_IMAGE_TO_IMAGE' WHERE task = 'TASK_CUSTOM'; | ||
|
||
COMMIT; |