Skip to content

Commit 69971ef

Browse files
committed
PR feedback; use INTEGER rather than UUID
1 parent b95ebb7 commit 69971ef

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

database/schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,5 +268,5 @@ sqlite> SELECT * FROM collector_config;
268268
269269
id target date_added last_heartbeat_at benchmark_set is_active
270270
--------- ------------------------- ------------- ---------------- --------- -------
271-
ea1f4e... aarch64-unknown-linux-gnu 2025-06-11... 2025-06-12 17... cea1bc... 0
271+
1 aarch64-unknown-linux-gnu 2025-06-11... 2025-06-12 17... 2 0
272272
```

database/src/pool/postgres.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ static MIGRATIONS: &[&str] = &[
285285
alter table pstat_series drop constraint test_case;
286286
alter table pstat_series add constraint test_case UNIQUE(crate, profile, scenario, backend, target, metric);
287287
"#,
288-
r#"CREATE EXTENSION IF NOT EXISTS "uuid-ossp";"#,
289288
r#"
290289
CREATE TABLE IF NOT EXISTS collector_config (
291-
id UUID PRIMARY KEY,
290+
id SERIAL PRIMARY KEY,
292291
target TEXT NOT NULL,
292+
name TEXT NOT NULL,
293293
date_added TIMESTAMPTZ DEFAULT NOW() NOT NULL,
294294
last_heartbeat_at TIMESTAMPTZ,
295-
benchmark_set UUID NOT NULL,
295+
benchmark_set INTEGER NOT NULL,
296296
is_active BOOLEAN DEFAULT FALSE NOT NULL
297297
);
298298
"#,

database/src/pool/sqlite.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,12 @@ static MIGRATIONS: &[Migration] = &[
407407
Migration::without_foreign_key_constraints(
408408
r#"
409409
CREATE TABLE IF NOT EXISTS collector_config (
410-
id TEXT PRIMARY KEY,
410+
id INTEGER AUTO INCREMENT PRIMARY KEY,
411411
target TEXT NOT NULL,
412+
name TEXT NOT NULL,
412413
date_added TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
413414
last_heartbeat_at TIMESTAMP,
414-
benchmark_set TEXT NOT NULL,
415+
benchmark_set INTEGER NOT NULL,
415416
is_active BOOLEAN DEFAULT FALSE NOT NULL
416417
);
417418
"#,

0 commit comments

Comments
 (0)