diff --git a/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/down.sql b/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/down.sql new file mode 100644 index 0000000000..6e752cd9e1 --- /dev/null +++ b/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/down.sql @@ -0,0 +1,7 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE prompts +DROP COLUMN maybe_duration_seconds, +ADD COLUMN maybe_duration VARCHAR(8) DEFAULT NULL; diff --git a/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/up.sql b/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/up.sql new file mode 100644 index 0000000000..c2f3ccccc4 --- /dev/null +++ b/_database/sql/migrations/2026-03-24-065550-0000_alter_prompts_change_fields/up.sql @@ -0,0 +1,7 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE prompts +DROP COLUMN maybe_duration, +ADD COLUMN maybe_duration_seconds INT UNSIGNED DEFAULT NULL; diff --git a/_database/sql/migrations_squashed/prompts/prompts.sql b/_database/sql/migrations_squashed/prompts/prompts.sql index 1195329358..ee8f680fe4 100644 --- a/_database/sql/migrations_squashed/prompts/prompts.sql +++ b/_database/sql/migrations_squashed/prompts/prompts.sql @@ -68,10 +68,8 @@ CREATE TABLE prompts ( -- The resolution for the prompt (eg. four_k, 720p, etc.) maybe_resolution VARCHAR(16) DEFAULT NULL, - -- TODO: Let's change this to an integer before writing to it. - -- The duration (eg. 8s, 16s, 2m, etc.) - -- Not an integer because we want to potentially support other units - maybe_duration VARCHAR(8) DEFAULT NULL, + -- The duration in seconds + maybe_duration_seconds INT UNSIGNED DEFAULT NULL, -- The number of outputs to generate (0-255) maybe_batch_count TINYINT UNSIGNED DEFAULT NULL,