diff --git a/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/down.sql b/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/down.sql new file mode 100644 index 0000000000..d2c6783653 --- /dev/null +++ b/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/down.sql @@ -0,0 +1,5 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE generic_inference_jobs DROP COLUMN store_in_aws; diff --git a/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/up.sql b/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/up.sql new file mode 100644 index 0000000000..93fa031b53 --- /dev/null +++ b/_sql/migrations/2024-08-29-020903_alter_generic_inference_jobs_add_store_in_aws/up.sql @@ -0,0 +1,7 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE generic_inference_jobs + ADD COLUMN store_in_aws BOOLEAN NOT NULL DEFAULT false + AFTER maybe_cover_image_media_file_token; diff --git a/_sql/migrations_squashed/generic_inference_jobs.sql b/_sql/migrations_squashed/generic_inference_jobs.sql index 4c8a027e44..a09da562bd 100644 --- a/_sql/migrations_squashed/generic_inference_jobs.sql +++ b/_sql/migrations_squashed/generic_inference_jobs.sql @@ -91,6 +91,10 @@ CREATE TABLE generic_inference_jobs ( -- And furthermore, not all download URLs have a cover image. maybe_cover_image_media_file_token VARCHAR(32) DEFAULT NULL, + -- A migration flag we can control from the backend API service which will tell + -- the worker where to store the results. If false, GCP. If true, AWS. + store_in_aws BOOLEAN NOT NULL DEFAULT FALSE, + -- ========== SUCCESS CASE ========== -- The type of the object will vary based on the type of the upload,