From af208f7088cbe669b27f47ca0f41a202269d374e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 28 Jul 2025 08:52:39 +0000 Subject: [PATCH] feat: migrate audit log ids to bigints (blocking migration for EE) --- .../20250728084742_migrate_audit_log_to_bigint.down.sql | 1 + .../20250728084742_migrate_audit_log_to_bigint.up.sql | 2 ++ backend/windmill-audit/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 backend/migrations/20250728084742_migrate_audit_log_to_bigint.down.sql create mode 100644 backend/migrations/20250728084742_migrate_audit_log_to_bigint.up.sql diff --git a/backend/migrations/20250728084742_migrate_audit_log_to_bigint.down.sql b/backend/migrations/20250728084742_migrate_audit_log_to_bigint.down.sql new file mode 100644 index 0000000000..d2f607c5b8 --- /dev/null +++ b/backend/migrations/20250728084742_migrate_audit_log_to_bigint.down.sql @@ -0,0 +1 @@ +-- Add down migration script here diff --git a/backend/migrations/20250728084742_migrate_audit_log_to_bigint.up.sql b/backend/migrations/20250728084742_migrate_audit_log_to_bigint.up.sql new file mode 100644 index 0000000000..8e5db2d648 --- /dev/null +++ b/backend/migrations/20250728084742_migrate_audit_log_to_bigint.up.sql @@ -0,0 +1,2 @@ +ALTER TABLE audit ALTER COLUMN id TYPE bigint; +ALTER SEQUENCE audit_id_seq AS bigint; \ No newline at end of file diff --git a/backend/windmill-audit/src/lib.rs b/backend/windmill-audit/src/lib.rs index 1c19890c37..8e74edfbf0 100644 --- a/backend/windmill-audit/src/lib.rs +++ b/backend/windmill-audit/src/lib.rs @@ -17,7 +17,7 @@ pub enum ActionKind { #[derive(FromRow, Serialize, Deserialize)] pub struct AuditLog { pub workspace_id: String, - pub id: i32, + pub id: i64, pub timestamp: chrono::DateTime, pub username: String, pub operation: String,