Skip to content

Commit a77fce4

Browse files
Merge pull request #1193 from Mark-Simulacrum/fix-postgres
Adjust migration to specify non-null default
2 parents 7011a96 + 03639e7 commit a77fce4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

database/src/pool/postgres.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ static MIGRATIONS: &[&str] = &[
207207
r#"
208208
create index if not exists collector_progress_start_time_step_idx on collector_progress (start_time, step) where start_time is not null and end_time is not null;
209209
"#,
210-
r#"alter table benchmark add column category text not null"#,
210+
// We default to secondary for all benchmarks, and then let the collector
211+
// apply new values once it runs.
212+
r#"
213+
alter table benchmark add column category text not null DEFAULT 'secondary';
214+
"#,
211215
];
212216

213217
#[async_trait::async_trait]

0 commit comments

Comments
 (0)