fix(outbound): align user FK with users(user_id) TEXT schema
V11 migration referenced users(id) as uuid, but V1 users table has user_id as TEXT primary key. Amending V11 and the OutboundConnection record before Task 7's integration tests catch this at Flyway startup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,9 +21,9 @@ CREATE TABLE outbound_connections (
|
||||
auth_config jsonb NOT NULL DEFAULT '{}',
|
||||
allowed_environment_ids uuid[] NOT NULL DEFAULT '{}',
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
created_by uuid NOT NULL REFERENCES users(id),
|
||||
created_by text NOT NULL REFERENCES users(user_id),
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_by uuid NOT NULL REFERENCES users(id),
|
||||
updated_by text NOT NULL REFERENCES users(user_id),
|
||||
CONSTRAINT outbound_connections_name_unique_per_tenant UNIQUE (tenant_id, name)
|
||||
);
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ public record OutboundConnection(
|
||||
OutboundAuth auth,
|
||||
List<UUID> allowedEnvironmentIds,
|
||||
Instant createdAt,
|
||||
UUID createdBy,
|
||||
String createdBy,
|
||||
Instant updatedAt,
|
||||
UUID updatedBy
|
||||
String updatedBy
|
||||
) {
|
||||
public OutboundConnection {
|
||||
defaultHeaders = defaultHeaders == null ? Map.of() : Map.copyOf(defaultHeaders);
|
||||
|
||||
@@ -4,9 +4,9 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface OutboundConnectionService {
|
||||
OutboundConnection create(OutboundConnection draft, UUID actingUserId);
|
||||
OutboundConnection update(UUID id, OutboundConnection draft, UUID actingUserId);
|
||||
void delete(UUID id, UUID actingUserId);
|
||||
OutboundConnection create(OutboundConnection draft, String actingUserId);
|
||||
OutboundConnection update(UUID id, OutboundConnection draft, String actingUserId);
|
||||
void delete(UUID id, String actingUserId);
|
||||
OutboundConnection get(UUID id);
|
||||
List<OutboundConnection> list();
|
||||
List<UUID> rulesReferencing(UUID id);
|
||||
|
||||
Reference in New Issue
Block a user