Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: changed to generic nullable

=a9b4c9874686
diff --git a/backend-go/internal/database/pg/gen/model/access_approval_policies.go b/backend-go/internal/database/pg/gen/model/access_approval_policies.go
index 52c2f5a5c3..b7a806222f 100644
--- a/backend-go/internal/database/pg/gen/model/access_approval_policies.go
+++ b/backend-go/internal/database/pg/gen/model/access_approval_policies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,7 +22,7 @@ type AccessApprovalPolicies struct {
CreatedAt time.Time
UpdatedAt time.Time
EnforcementLevel string
- DeletedAt *time.Time
+ DeletedAt sql.NullTime
AllowedSelfApprovals bool
- MaxTimePeriod *string
+ MaxTimePeriod sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/access_approval_policies_approvers.go b/backend-go/internal/database/pg/gen/model/access_approval_policies_approvers.go
index ea98a17d87..43eb1f5f8b 100644
--- a/backend-go/internal/database/pg/gen/model/access_approval_policies_approvers.go
+++ b/backend-go/internal/database/pg/gen/model/access_approval_policies_approvers.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,8 +18,8 @@ type AccessApprovalPoliciesApprovers struct {
PolicyId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- ApproverUserId *uuid.UUID
- ApproverGroupId *uuid.UUID
- Sequence *int32
- ApprovalsRequired *int32
+ ApproverUserId sql.Null[uuid.UUID]
+ ApproverGroupId sql.Null[uuid.UUID]
+ Sequence sql.Null[int32]
+ ApprovalsRequired sql.Null[int32]
}
diff --git a/backend-go/internal/database/pg/gen/model/access_approval_policies_bypassers.go b/backend-go/internal/database/pg/gen/model/access_approval_policies_bypassers.go
index ff6a871586..2a79bb2dc3 100644
--- a/backend-go/internal/database/pg/gen/model/access_approval_policies_bypassers.go
+++ b/backend-go/internal/database/pg/gen/model/access_approval_policies_bypassers.go
@@ -8,14 +8,15 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type AccessApprovalPoliciesBypassers struct {
ID uuid.UUID `sql:"primary_key"`
- BypasserGroupId *uuid.UUID
- BypasserUserId *uuid.UUID
+ BypasserGroupId sql.Null[uuid.UUID]
+ BypasserUserId sql.Null[uuid.UUID]
PolicyId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/access_approval_requests.go b/backend-go/internal/database/pg/gen/model/access_approval_requests.go
index 7293da507b..56dabde103 100644
--- a/backend-go/internal/database/pg/gen/model/access_approval_requests.go
+++ b/backend-go/internal/database/pg/gen/model/access_approval_requests.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,16 +16,16 @@ import (
type AccessApprovalRequests struct {
ID uuid.UUID `sql:"primary_key"`
PolicyId uuid.UUID
- PrivilegeId *uuid.UUID
+ PrivilegeId sql.Null[uuid.UUID]
IsTemporary bool
- TemporaryRange *string
+ TemporaryRange sql.Null[string]
Permissions string
CreatedAt time.Time
UpdatedAt time.Time
RequestedByUserId uuid.UUID
- Note *string
- PrivilegeDeletedAt *time.Time
+ Note sql.Null[string]
+ PrivilegeDeletedAt sql.NullTime
Status string
- EditedByUserId *uuid.UUID
- EditNote *string
+ EditedByUserId sql.Null[uuid.UUID]
+ EditNote sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/additional_privileges.go b/backend-go/internal/database/pg/gen/model/additional_privileges.go
index c2025dff08..9b2ecc38ec 100644
--- a/backend-go/internal/database/pg/gen/model/additional_privileges.go
+++ b/backend-go/internal/database/pg/gen/model/additional_privileges.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,15 +17,15 @@ type AdditionalPrivileges struct {
ID uuid.UUID `sql:"primary_key"`
Name string
IsTemporary bool
- TemporaryMode *string
- TemporaryRange *string
- TemporaryAccessStartTime *time.Time
- TemporaryAccessEndTime *time.Time
+ TemporaryMode sql.Null[string]
+ TemporaryRange sql.Null[string]
+ TemporaryAccessStartTime sql.NullTime
+ TemporaryAccessEndTime sql.NullTime
Permissions string
- ActorUserId *uuid.UUID
- ActorIdentityId *uuid.UUID
- OrgId *uuid.UUID
- ProjectId *string
+ ActorUserId sql.Null[uuid.UUID]
+ ActorIdentityId sql.Null[uuid.UUID]
+ OrgId sql.Null[uuid.UUID]
+ ProjectId sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/ai_mcp_endpoints.go b/backend-go/internal/database/pg/gen/model/ai_mcp_endpoints.go
index eb5656ff6e..fb021160a6 100644
--- a/backend-go/internal/database/pg/gen/model/ai_mcp_endpoints.go
+++ b/backend-go/internal/database/pg/gen/model/ai_mcp_endpoints.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -16,8 +17,8 @@ import (
type AiMcpEndpoints struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
- Status *string
+ Description sql.Null[string]
+ Status sql.Null[string]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/ai_mcp_server_tools.go b/backend-go/internal/database/pg/gen/model/ai_mcp_server_tools.go
index 7c547222b3..4b67ce8b5f 100644
--- a/backend-go/internal/database/pg/gen/model/ai_mcp_server_tools.go
+++ b/backend-go/internal/database/pg/gen/model/ai_mcp_server_tools.go
@@ -8,13 +8,14 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type AiMcpServerTools struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
- InputSchema *string
+ Description sql.Null[string]
+ InputSchema sql.Null[string]
AiMcpServerId uuid.UUID
}
diff --git a/backend-go/internal/database/pg/gen/model/ai_mcp_servers.go b/backend-go/internal/database/pg/gen/model/ai_mcp_servers.go
index 0b75c53a90..05d39f91d3 100644
--- a/backend-go/internal/database/pg/gen/model/ai_mcp_servers.go
+++ b/backend-go/internal/database/pg/gen/model/ai_mcp_servers.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,14 +17,14 @@ type AiMcpServers struct {
ID uuid.UUID `sql:"primary_key"`
Name string
URL string
- Description *string
- Status *string
- CredentialMode *string
- AuthMethod *string
- EncryptedCredentials *[]byte
- EncryptedOauthConfig *[]byte
+ Description sql.Null[string]
+ Status sql.Null[string]
+ CredentialMode sql.Null[string]
+ AuthMethod sql.Null[string]
+ EncryptedCredentials sql.Null[[]byte]
+ EncryptedOauthConfig sql.Null[[]byte]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
- GatewayId *uuid.UUID
+ GatewayId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/api_keys.go b/backend-go/internal/database/pg/gen/model/api_keys.go
index 6407b2132a..804a0d0e54 100644
--- a/backend-go/internal/database/pg/gen/model/api_keys.go
+++ b/backend-go/internal/database/pg/gen/model/api_keys.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,8 +16,8 @@ import (
type APIKeys struct {
ID string `sql:"primary_key"`
Name string
- LastUsed *time.Time
- ExpiresAt *time.Time
+ LastUsed sql.NullTime
+ ExpiresAt sql.NullTime
SecretHash string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/app_connection_credential_rotations.go b/backend-go/internal/database/pg/gen/model/app_connection_credential_rotations.go
index a7f94965d1..d440289454 100644
--- a/backend-go/internal/database/pg/gen/model/app_connection_credential_rotations.go
+++ b/backend-go/internal/database/pg/gen/model/app_connection_credential_rotations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -20,11 +21,11 @@ type AppConnectionCredentialRotations struct {
RotationInterval int32
RotateAtUtc string
RotationStatus string
- LastRotationAttemptedAt *time.Time
- LastRotatedAt *time.Time
- EncryptedLastRotationMessage *[]byte
- LastRotationJobId *string
- NextRotationAt *time.Time
+ LastRotationAttemptedAt sql.NullTime
+ LastRotatedAt sql.NullTime
+ EncryptedLastRotationMessage sql.Null[[]byte]
+ LastRotationJobId sql.Null[string]
+ NextRotationAt sql.NullTime
ActiveIndex int32
EncryptedGeneratedCredentials []byte
CreatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/app_connections.go b/backend-go/internal/database/pg/gen/model/app_connections.go
index 3ef3977ccb..5f652c25a9 100644
--- a/backend-go/internal/database/pg/gen/model/app_connections.go
+++ b/backend-go/internal/database/pg/gen/model/app_connections.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type AppConnections struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
App string
Method string
EncryptedCredentials []byte
@@ -23,8 +24,8 @@ type AppConnections struct {
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- IsPlatformManagedCredentials *bool
- GatewayId *uuid.UUID
- ProjectId *string
+ IsPlatformManagedCredentials sql.Null[bool]
+ GatewayId sql.Null[uuid.UUID]
+ ProjectId sql.Null[string]
IsAutoRotationEnabled bool
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_policies.go b/backend-go/internal/database/pg/gen/model/approval_policies.go
index 8eccdc15b2..8cab43a66f 100644
--- a/backend-go/internal/database/pg/gen/model/approval_policies.go
+++ b/backend-go/internal/database/pg/gen/model/approval_policies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,11 +19,11 @@ type ApprovalPolicies struct {
OrganizationId uuid.UUID
Type string
Name string
- IsActive *bool
- MaxRequestTtl *string
+ IsActive sql.Null[bool]
+ MaxRequestTtl sql.Null[string]
Conditions string
Constraints string
CreatedAt time.Time
UpdatedAt time.Time
- BypassForMachineIdentities *bool
+ BypassForMachineIdentities sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_policy_step_approvers.go b/backend-go/internal/database/pg/gen/model/approval_policy_step_approvers.go
index 00bf432947..8ab0ca31aa 100644
--- a/backend-go/internal/database/pg/gen/model/approval_policy_step_approvers.go
+++ b/backend-go/internal/database/pg/gen/model/approval_policy_step_approvers.go
@@ -8,12 +8,13 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type ApprovalPolicyStepApprovers struct {
ID uuid.UUID `sql:"primary_key"`
PolicyStepId uuid.UUID
- UserId *uuid.UUID
- GroupId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ GroupId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_policy_steps.go b/backend-go/internal/database/pg/gen/model/approval_policy_steps.go
index 38b2008ff9..25948c4fd8 100644
--- a/backend-go/internal/database/pg/gen/model/approval_policy_steps.go
+++ b/backend-go/internal/database/pg/gen/model/approval_policy_steps.go
@@ -8,14 +8,15 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type ApprovalPolicySteps struct {
ID uuid.UUID `sql:"primary_key"`
PolicyId uuid.UUID
- Name *string
+ Name sql.Null[string]
StepNumber int32
RequiredApprovals int32
- NotifyApprovers *bool
+ NotifyApprovers sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_request_approvals.go b/backend-go/internal/database/pg/gen/model/approval_request_approvals.go
index 6710b8a238..710ff8d03c 100644
--- a/backend-go/internal/database/pg/gen/model/approval_request_approvals.go
+++ b/backend-go/internal/database/pg/gen/model/approval_request_approvals.go
@@ -8,8 +8,8 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
- "time"
)
type ApprovalRequestApprovals struct {
@@ -17,6 +17,6 @@ type ApprovalRequestApprovals struct {
StepId uuid.UUID
ApproverUserId uuid.UUID
Decision string
- Comment *string
- CreatedAt *time.Time
+ Comment sql.Null[string]
+ CreatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_request_grants.go b/backend-go/internal/database/pg/gen/model/approval_request_grants.go
index e75aa8df4e..65cbdbc71c 100644
--- a/backend-go/internal/database/pg/gen/model/approval_request_grants.go
+++ b/backend-go/internal/database/pg/gen/model/approval_request_grants.go
@@ -8,21 +8,21 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
- "time"
)
type ApprovalRequestGrants struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- RequestId *uuid.UUID
- GranteeUserId *uuid.UUID
- RevokedByUserId *uuid.UUID
- RevocationReason *string
+ RequestId sql.Null[uuid.UUID]
+ GranteeUserId sql.Null[uuid.UUID]
+ RevokedByUserId sql.Null[uuid.UUID]
+ RevocationReason sql.Null[string]
Status string
Type string
Attributes string
- CreatedAt *time.Time
- ExpiresAt *time.Time
- RevokedAt *time.Time
+ CreatedAt sql.NullTime
+ ExpiresAt sql.NullTime
+ RevokedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_request_step_eligible_approvers.go b/backend-go/internal/database/pg/gen/model/approval_request_step_eligible_approvers.go
index 8eb6aa165e..ce55211db8 100644
--- a/backend-go/internal/database/pg/gen/model/approval_request_step_eligible_approvers.go
+++ b/backend-go/internal/database/pg/gen/model/approval_request_step_eligible_approvers.go
@@ -8,12 +8,13 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type ApprovalRequestStepEligibleApprovers struct {
ID uuid.UUID `sql:"primary_key"`
StepId uuid.UUID
- UserId *uuid.UUID
- GroupId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ GroupId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_request_steps.go b/backend-go/internal/database/pg/gen/model/approval_request_steps.go
index 2c193105cc..14120187d8 100644
--- a/backend-go/internal/database/pg/gen/model/approval_request_steps.go
+++ b/backend-go/internal/database/pg/gen/model/approval_request_steps.go
@@ -8,18 +8,18 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
- "time"
)
type ApprovalRequestSteps struct {
ID uuid.UUID `sql:"primary_key"`
RequestId uuid.UUID
StepNumber int32
- Name *string
+ Name sql.Null[string]
Status string
RequiredApprovals int32
- NotifyApprovers *bool
- StartedAt *time.Time
- CompletedAt *time.Time
+ NotifyApprovers sql.Null[bool]
+ StartedAt sql.NullTime
+ CompletedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/approval_requests.go b/backend-go/internal/database/pg/gen/model/approval_requests.go
index d31bae6fc3..a196e63945 100644
--- a/backend-go/internal/database/pg/gen/model/approval_requests.go
+++ b/backend-go/internal/database/pg/gen/model/approval_requests.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,17 +17,17 @@ type ApprovalRequests struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
OrganizationId uuid.UUID
- PolicyId *uuid.UUID
- RequesterId *uuid.UUID
+ PolicyId sql.Null[uuid.UUID]
+ RequesterId sql.Null[uuid.UUID]
RequesterName string
RequesterEmail string
Type string
Status string
- Justification *string
+ Justification sql.Null[string]
CurrentStep int32
RequestData string
- ExpiresAt *time.Time
+ ExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
- MachineIdentityId *uuid.UUID
+ MachineIdentityId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/audit_log_streams.go b/backend-go/internal/database/pg/gen/model/audit_log_streams.go
index 1be88402eb..5b235b0549 100644
--- a/backend-go/internal/database/pg/gen/model/audit_log_streams.go
+++ b/backend-go/internal/database/pg/gen/model/audit_log_streams.go
@@ -8,18 +8,19 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type AuditLogStreams struct {
ID uuid.UUID `sql:"primary_key"`
- URL *string
- EncryptedHeadersCiphertext *string
- EncryptedHeadersIV *string
- EncryptedHeadersTag *string
- EncryptedHeadersAlgorithm *string
- EncryptedHeadersKeyEncoding *string
+ URL sql.Null[string]
+ EncryptedHeadersCiphertext sql.Null[string]
+ EncryptedHeadersIV sql.Null[string]
+ EncryptedHeadersTag sql.Null[string]
+ EncryptedHeadersAlgorithm sql.Null[string]
+ EncryptedHeadersKeyEncoding sql.Null[string]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/audit_logs.go b/backend-go/internal/database/pg/gen/model/audit_logs.go
index 1e2fb6aa20..0a1fda0ba7 100644
--- a/backend-go/internal/database/pg/gen/model/audit_logs.go
+++ b/backend-go/internal/database/pg/gen/model/audit_logs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,15 +17,15 @@ type AuditLogs struct {
ID uuid.UUID `sql:"primary_key"`
Actor string
ActorMetadata string
- IpAddress *string
+ IpAddress sql.Null[string]
EventType string
- EventMetadata *string
- UserAgent *string
- UserAgentType *string
- ExpiresAt *time.Time
+ EventMetadata sql.Null[string]
+ UserAgent sql.Null[string]
+ UserAgentType sql.Null[string]
+ ExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
- OrgId *uuid.UUID
- ProjectId *string
- ProjectName *string
+ OrgId sql.Null[uuid.UUID]
+ ProjectId sql.Null[string]
+ ProjectName sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/auth_token_sessions.go b/backend-go/internal/database/pg/gen/model/auth_token_sessions.go
index 677adf6fa0..892ddd5514 100644
--- a/backend-go/internal/database/pg/gen/model/auth_token_sessions.go
+++ b/backend-go/internal/database/pg/gen/model/auth_token_sessions.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type AuthTokenSessions struct {
ID uuid.UUID `sql:"primary_key"`
IP string
- UserAgent *string
+ UserAgent sql.Null[string]
RefreshVersion int32
AccessVersion int32
LastUsed time.Time
diff --git a/backend-go/internal/database/pg/gen/model/auth_tokens.go b/backend-go/internal/database/pg/gen/model/auth_tokens.go
index d8a4272a66..3cbe562898 100644
--- a/backend-go/internal/database/pg/gen/model/auth_tokens.go
+++ b/backend-go/internal/database/pg/gen/model/auth_tokens.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,14 +16,14 @@ import (
type AuthTokens struct {
ID uuid.UUID `sql:"primary_key"`
Type string
- PhoneNumber *string
+ PhoneNumber sql.Null[string]
TokenHash string
- TriesLeft *int32
+ TriesLeft sql.Null[int32]
ExpiresAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
- UserId *uuid.UUID
- OrgId *uuid.UUID
- AliasId *string
- Payload *string
+ UserId sql.Null[uuid.UUID]
+ OrgId sql.Null[uuid.UUID]
+ AliasId sql.Null[string]
+ Payload sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/ca_signing_configs.go b/backend-go/internal/database/pg/gen/model/ca_signing_configs.go
index 23bebda8d3..1b08c6414b 100644
--- a/backend-go/internal/database/pg/gen/model/ca_signing_configs.go
+++ b/backend-go/internal/database/pg/gen/model/ca_signing_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,10 +17,10 @@ type CaSigningConfigs struct {
ID uuid.UUID `sql:"primary_key"`
CaId uuid.UUID
Type string
- ParentCaId *uuid.UUID
- AppConnectionId *uuid.UUID
- DestinationConfig *string
- LastExternalCertificateId *string
+ ParentCaId sql.Null[uuid.UUID]
+ AppConnectionId sql.Null[uuid.UUID]
+ DestinationConfig sql.Null[string]
+ LastExternalCertificateId sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/certificate_bodies.go b/backend-go/internal/database/pg/gen/model/certificate_bodies.go
index 8190b4b51b..565e41f240 100644
--- a/backend-go/internal/database/pg/gen/model/certificate_bodies.go
+++ b/backend-go/internal/database/pg/gen/model/certificate_bodies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,5 +19,5 @@ type CertificateBodies struct {
UpdatedAt time.Time
CertId uuid.UUID
EncryptedCertificate []byte
- EncryptedCertificateChain *[]byte
+ EncryptedCertificateChain sql.Null[[]byte]
}
diff --git a/backend-go/internal/database/pg/gen/model/certificate_requests.go b/backend-go/internal/database/pg/gen/model/certificate_requests.go
index 95183a593a..d916ebbe72 100644
--- a/backend-go/internal/database/pg/gen/model/certificate_requests.go
+++ b/backend-go/internal/database/pg/gen/model/certificate_requests.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -19,28 +20,28 @@ type CertificateRequests struct {
UpdatedAt time.Time
Status string
ProjectId string
- ProfileId *uuid.UUID
- CaId *uuid.UUID
- CertificateId *uuid.UUID
- Csr *string
- CommonName *string
+ ProfileId sql.Null[uuid.UUID]
+ CaId sql.Null[uuid.UUID]
+ CertificateId sql.Null[uuid.UUID]
+ Csr sql.Null[string]
+ CommonName sql.Null[string]
KeyUsages *pq.StringArray
ExtendedKeyUsages *pq.StringArray
- NotBefore *time.Time
- NotAfter *time.Time
- KeyAlgorithm *string
- SignatureAlgorithm *string
- ErrorMessage *string
- Metadata *string
- AcmeOrderId *uuid.UUID
- BasicConstraints *string
- ApprovalRequestId *uuid.UUID
- TTL *string
- EnrollmentType *string
- AltNames *string
- Organization *string
- OrganizationalUnit *string
- Country *string
- State *string
- Locality *string
+ NotBefore sql.NullTime
+ NotAfter sql.NullTime
+ KeyAlgorithm sql.Null[string]
+ SignatureAlgorithm sql.Null[string]
+ ErrorMessage sql.Null[string]
+ Metadata sql.Null[string]
+ AcmeOrderId sql.Null[uuid.UUID]
+ BasicConstraints sql.Null[string]
+ ApprovalRequestId sql.Null[uuid.UUID]
+ TTL sql.Null[string]
+ EnrollmentType sql.Null[string]
+ AltNames sql.Null[string]
+ Organization sql.Null[string]
+ OrganizationalUnit sql.Null[string]
+ Country sql.Null[string]
+ State sql.Null[string]
+ Locality sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/certificate_syncs.go b/backend-go/internal/database/pg/gen/model/certificate_syncs.go
index 69771da121..70e3ca7408 100644
--- a/backend-go/internal/database/pg/gen/model/certificate_syncs.go
+++ b/backend-go/internal/database/pg/gen/model/certificate_syncs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,11 +17,11 @@ type CertificateSyncs struct {
ID uuid.UUID `sql:"primary_key"`
PkiSyncId uuid.UUID
CertificateId uuid.UUID
- SyncStatus *string
- LastSyncMessage *string
- LastSyncedAt *time.Time
+ SyncStatus sql.Null[string]
+ LastSyncMessage sql.Null[string]
+ LastSyncedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
- ExternalIdentifier *string
- SyncMetadata *string
+ ExternalIdentifier sql.Null[string]
+ SyncMetadata sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/certificate_template_est_configs.go b/backend-go/internal/database/pg/gen/model/certificate_template_est_configs.go
index 385c499c6b..70fcee7000 100644
--- a/backend-go/internal/database/pg/gen/model/certificate_template_est_configs.go
+++ b/backend-go/internal/database/pg/gen/model/certificate_template_est_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type CertificateTemplateEstConfigs struct {
ID uuid.UUID `sql:"primary_key"`
CertificateTemplateId uuid.UUID
- EncryptedCaChain *[]byte
+ EncryptedCaChain sql.Null[[]byte]
HashedPassphrase string
IsEnabled bool
CreatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/certificate_templates.go b/backend-go/internal/database/pg/gen/model/certificate_templates.go
index d71968be66..7ab2b328aa 100644
--- a/backend-go/internal/database/pg/gen/model/certificate_templates.go
+++ b/backend-go/internal/database/pg/gen/model/certificate_templates.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -16,7 +17,7 @@ import (
type CertificateTemplates struct {
ID uuid.UUID `sql:"primary_key"`
CaId uuid.UUID
- PkiCollectionId *uuid.UUID
+ PkiCollectionId sql.Null[uuid.UUID]
Name string
CommonName string
SubjectAlternativeName string
diff --git a/backend-go/internal/database/pg/gen/model/certificates.go b/backend-go/internal/database/pg/gen/model/certificates.go
index 62131a8e02..2f8240eea0 100644
--- a/backend-go/internal/database/pg/gen/model/certificates.go
+++ b/backend-go/internal/database/pg/gen/model/certificates.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -17,38 +18,38 @@ type Certificates struct {
ID uuid.UUID `sql:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
- CaId *uuid.UUID
+ CaId sql.Null[uuid.UUID]
Status string
SerialNumber string
FriendlyName string
CommonName string
NotBefore time.Time
NotAfter time.Time
- RevokedAt *time.Time
- RevocationReason *int32
- AltNames *string
- CaCertId *uuid.UUID
- CertificateTemplateId *uuid.UUID
+ RevokedAt sql.NullTime
+ RevocationReason sql.Null[int32]
+ AltNames sql.Null[string]
+ CaCertId sql.Null[uuid.UUID]
+ CertificateTemplateId sql.Null[uuid.UUID]
KeyUsages *pq.StringArray
ExtendedKeyUsages *pq.StringArray
ProjectId string
- PkiSubscriberId *uuid.UUID
- ProfileId *uuid.UUID
- RenewBeforeDays *int32
- RenewedFromCertificateId *uuid.UUID
- RenewedByCertificateId *uuid.UUID
- RenewalError *string
- KeyAlgorithm *string
- SignatureAlgorithm *string
- SubjectOrganization *string
- SubjectOrganizationalUnit *string
- SubjectCountry *string
- SubjectState *string
- SubjectLocality *string
- FingerprintSha256 *string
- FingerprintSha1 *string
- IsCA *bool
- PathLength *int32
- Source *string
- DiscoveryMetadata *string
+ PkiSubscriberId sql.Null[uuid.UUID]
+ ProfileId sql.Null[uuid.UUID]
+ RenewBeforeDays sql.Null[int32]
+ RenewedFromCertificateId sql.Null[uuid.UUID]
+ RenewedByCertificateId sql.Null[uuid.UUID]
+ RenewalError sql.Null[string]
+ KeyAlgorithm sql.Null[string]
+ SignatureAlgorithm sql.Null[string]
+ SubjectOrganization sql.Null[string]
+ SubjectOrganizationalUnit sql.Null[string]
+ SubjectCountry sql.Null[string]
+ SubjectState sql.Null[string]
+ SubjectLocality sql.Null[string]
+ FingerprintSha256 sql.Null[string]
+ FingerprintSha1 sql.Null[string]
+ IsCA sql.Null[bool]
+ PathLength sql.Null[int32]
+ Source sql.Null[string]
+ DiscoveryMetadata sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/dynamic_secret_leases.go b/backend-go/internal/database/pg/gen/model/dynamic_secret_leases.go
index 863f27ad93..256d6b3b73 100644
--- a/backend-go/internal/database/pg/gen/model/dynamic_secret_leases.go
+++ b/backend-go/internal/database/pg/gen/model/dynamic_secret_leases.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,10 +18,10 @@ type DynamicSecretLeases struct {
Version int32
ExternalEntityId string
ExpireAt time.Time
- Status *string
- StatusDetails *string
+ Status sql.Null[string]
+ StatusDetails sql.Null[string]
DynamicSecretId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- Config *string
+ Config sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/dynamic_secrets.go b/backend-go/internal/database/pg/gen/model/dynamic_secrets.go
index c01975cd9d..5e2645eecd 100644
--- a/backend-go/internal/database/pg/gen/model/dynamic_secrets.go
+++ b/backend-go/internal/database/pg/gen/model/dynamic_secrets.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,20 +19,20 @@ type DynamicSecrets struct {
Version int32
Type string
DefaultTTL string
- MaxTTL *string
- InputIV *string
- InputCiphertext *string
- InputTag *string
+ MaxTTL sql.Null[string]
+ InputIV sql.Null[string]
+ InputCiphertext sql.Null[string]
+ InputTag sql.Null[string]
Algorithm string
KeyEncoding string
FolderId uuid.UUID
- Status *string
- StatusDetails *string
+ Status sql.Null[string]
+ StatusDetails sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
EncryptedInput []byte
- ProjectGatewayId *uuid.UUID
- GatewayId *uuid.UUID
- UsernameTemplate *string
- GatewayV2Id *uuid.UUID
+ ProjectGatewayId sql.Null[uuid.UUID]
+ GatewayId sql.Null[uuid.UUID]
+ UsernameTemplate sql.Null[string]
+ GatewayV2Id sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/external_certificate_authorities.go b/backend-go/internal/database/pg/gen/model/external_certificate_authorities.go
index afc2bed2a1..327f979edc 100644
--- a/backend-go/internal/database/pg/gen/model/external_certificate_authorities.go
+++ b/backend-go/internal/database/pg/gen/model/external_certificate_authorities.go
@@ -8,15 +8,16 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type ExternalCertificateAuthorities struct {
ID uuid.UUID `sql:"primary_key"`
Type string
- AppConnectionId *uuid.UUID
- DnsAppConnectionId *uuid.UUID
+ AppConnectionId sql.Null[uuid.UUID]
+ DnsAppConnectionId sql.Null[uuid.UUID]
CaId uuid.UUID
- Credentials *[]byte
- Configuration *string
+ Credentials sql.Null[[]byte]
+ Configuration sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/external_group_org_role_mappings.go b/backend-go/internal/database/pg/gen/model/external_group_org_role_mappings.go
index a37d05b682..032d808509 100644
--- a/backend-go/internal/database/pg/gen/model/external_group_org_role_mappings.go
+++ b/backend-go/internal/database/pg/gen/model/external_group_org_role_mappings.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,7 +17,7 @@ type ExternalGroupOrgRoleMappings struct {
ID uuid.UUID `sql:"primary_key"`
GroupName string
Role string
- RoleId *uuid.UUID
+ RoleId sql.Null[uuid.UUID]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/external_kms.go b/backend-go/internal/database/pg/gen/model/external_kms.go
index 06cf7c5ee5..fb8b47c75c 100644
--- a/backend-go/internal/database/pg/gen/model/external_kms.go
+++ b/backend-go/internal/database/pg/gen/model/external_kms.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
@@ -15,7 +16,7 @@ type ExternalKms struct {
ID uuid.UUID `sql:"primary_key"`
Provider string
EncryptedProviderInputs []byte
- Status *string
- StatusDetails *string
+ Status sql.Null[string]
+ StatusDetails sql.Null[string]
KmsKeyId uuid.UUID
}
diff --git a/backend-go/internal/database/pg/gen/model/folder_checkpoint_resources.go b/backend-go/internal/database/pg/gen/model/folder_checkpoint_resources.go
index d2dbd3355f..8fe1cd2a46 100644
--- a/backend-go/internal/database/pg/gen/model/folder_checkpoint_resources.go
+++ b/backend-go/internal/database/pg/gen/model/folder_checkpoint_resources.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,8 +16,8 @@ import (
type FolderCheckpointResources struct {
ID uuid.UUID `sql:"primary_key"`
FolderCheckpointId uuid.UUID
- SecretVersionId *uuid.UUID
- FolderVersionId *uuid.UUID
+ SecretVersionId sql.Null[uuid.UUID]
+ FolderVersionId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/folder_commit_changes.go b/backend-go/internal/database/pg/gen/model/folder_commit_changes.go
index a0ac34e37d..46f5450fa4 100644
--- a/backend-go/internal/database/pg/gen/model/folder_commit_changes.go
+++ b/backend-go/internal/database/pg/gen/model/folder_commit_changes.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,8 +18,8 @@ type FolderCommitChanges struct {
FolderCommitId uuid.UUID
ChangeType string
IsUpdate bool
- SecretVersionId *uuid.UUID
- FolderVersionId *uuid.UUID
+ SecretVersionId sql.Null[uuid.UUID]
+ FolderVersionId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/folder_commits.go b/backend-go/internal/database/pg/gen/model/folder_commits.go
index 1885f3c90e..7437d20065 100644
--- a/backend-go/internal/database/pg/gen/model/folder_commits.go
+++ b/backend-go/internal/database/pg/gen/model/folder_commits.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type FolderCommits struct {
CommitId int64
ActorMetadata string
ActorType string
- Message *string
+ Message sql.Null[string]
FolderId uuid.UUID
EnvId uuid.UUID
CreatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/gateways.go b/backend-go/internal/database/pg/gen/model/gateways.go
index 1f5115b113..733fe39d19 100644
--- a/backend-go/internal/database/pg/gen/model/gateways.go
+++ b/backend-go/internal/database/pg/gen/model/gateways.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -19,7 +20,7 @@ type Gateways struct {
KeyAlgorithm string
IssuedAt time.Time
Expiration time.Time
- Heartbeat *time.Time
+ Heartbeat sql.NullTime
RelayAddress []byte
OrgGatewayRootCaId uuid.UUID
IdentityId uuid.UUID
diff --git a/backend-go/internal/database/pg/gen/model/gateways_v2.go b/backend-go/internal/database/pg/gen/model/gateways_v2.go
index 6c4994145f..460c8892ce 100644
--- a/backend-go/internal/database/pg/gen/model/gateways_v2.go
+++ b/backend-go/internal/database/pg/gen/model/gateways_v2.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,9 +19,9 @@ type GatewaysV2 struct {
UpdatedAt time.Time
OrgId uuid.UUID
IdentityId uuid.UUID
- RelayId *uuid.UUID
+ RelayId sql.Null[uuid.UUID]
Name string
- Heartbeat *time.Time
- EncryptedPamSessionKey *[]byte
- HealthAlertedAt *time.Time
+ Heartbeat sql.NullTime
+ EncryptedPamSessionKey sql.Null[[]byte]
+ HealthAlertedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/git_app_install_sessions.go b/backend-go/internal/database/pg/gen/model/git_app_install_sessions.go
index 8b02a245e0..66fb0dff8a 100644
--- a/backend-go/internal/database/pg/gen/model/git_app_install_sessions.go
+++ b/backend-go/internal/database/pg/gen/model/git_app_install_sessions.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type GitAppInstallSessions struct {
ID uuid.UUID `sql:"primary_key"`
SessionId string
- UserId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/github_org_sync_configs.go b/backend-go/internal/database/pg/gen/model/github_org_sync_configs.go
index b5d1754918..c23e35850e 100644
--- a/backend-go/internal/database/pg/gen/model/github_org_sync_configs.go
+++ b/backend-go/internal/database/pg/gen/model/github_org_sync_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,8 +16,8 @@ import (
type GithubOrgSyncConfigs struct {
ID uuid.UUID `sql:"primary_key"`
GithubOrgName string
- IsActive *bool
- EncryptedGithubOrgAccessToken *[]byte
+ IsActive sql.Null[bool]
+ EncryptedGithubOrgAccessToken sql.Null[[]byte]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/identities.go b/backend-go/internal/database/pg/gen/model/identities.go
index 53896eeb81..bd5abf6160 100644
--- a/backend-go/internal/database/pg/gen/model/identities.go
+++ b/backend-go/internal/database/pg/gen/model/identities.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,10 +16,10 @@ import (
type Identities struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- AuthMethod *string
+ AuthMethod sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
HasDeleteProtection bool
OrgId uuid.UUID
- ProjectId *string
+ ProjectId sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_access_tokens.go b/backend-go/internal/database/pg/gen/model/identity_access_tokens.go
index f0c06edc42..f73ce271d1 100644
--- a/backend-go/internal/database/pg/gen/model/identity_access_tokens.go
+++ b/backend-go/internal/database/pg/gen/model/identity_access_tokens.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,15 +19,15 @@ type IdentityAccessTokens struct {
AccessTokenMaxTTL int64
AccessTokenNumUses int64
AccessTokenNumUsesLimit int64
- AccessTokenLastUsedAt *time.Time
- AccessTokenLastRenewedAt *time.Time
+ AccessTokenLastUsedAt sql.NullTime
+ AccessTokenLastRenewedAt sql.NullTime
IsAccessTokenRevoked bool
- IdentityUAClientSecretId *string
+ IdentityUAClientSecretId sql.Null[string]
IdentityId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- Name *string
+ Name sql.Null[string]
AuthMethod string
AccessTokenPeriod int64
- SubOrganizationId *uuid.UUID
+ SubOrganizationId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_gcp_auths.go b/backend-go/internal/database/pg/gen/model/identity_gcp_auths.go
index 93d980d33a..b94688773a 100644
--- a/backend-go/internal/database/pg/gen/model/identity_gcp_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_gcp_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -22,8 +23,8 @@ type IdentityGcpAuths struct {
UpdatedAt time.Time
IdentityId uuid.UUID
Type string
- AllowedServiceAccounts *string
- AllowedProjects *string
- AllowedZones *string
+ AllowedServiceAccounts sql.Null[string]
+ AllowedProjects sql.Null[string]
+ AllowedZones sql.Null[string]
AccessTokenPeriod int64
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_kubernetes_auths.go b/backend-go/internal/database/pg/gen/model/identity_kubernetes_auths.go
index 0554a168a6..3e0dd5edf8 100644
--- a/backend-go/internal/database/pg/gen/model/identity_kubernetes_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_kubernetes_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,20 +22,20 @@ type IdentityKubernetesAuths struct {
CreatedAt time.Time
UpdatedAt time.Time
IdentityId uuid.UUID
- KubernetesHost *string
- EncryptedCaCert *string
- CaCertIV *string
- CaCertTag *string
- EncryptedTokenReviewerJwt *string
- TokenReviewerJwtIV *string
- TokenReviewerJwtTag *string
+ KubernetesHost sql.Null[string]
+ EncryptedCaCert sql.Null[string]
+ CaCertIV sql.Null[string]
+ CaCertTag sql.Null[string]
+ EncryptedTokenReviewerJwt sql.Null[string]
+ TokenReviewerJwtIV sql.Null[string]
+ TokenReviewerJwtTag sql.Null[string]
AllowedNamespaces string
AllowedNames string
AllowedAudience string
- EncryptedKubernetesTokenReviewerJwt *[]byte
- EncryptedKubernetesCaCertificate *[]byte
- GatewayId *uuid.UUID
+ EncryptedKubernetesTokenReviewerJwt sql.Null[[]byte]
+ EncryptedKubernetesCaCertificate sql.Null[[]byte]
+ GatewayId sql.Null[uuid.UUID]
AccessTokenPeriod int64
TokenReviewMode string
- GatewayV2Id *uuid.UUID
+ GatewayV2Id sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_ldap_auths.go b/backend-go/internal/database/pg/gen/model/identity_ldap_auths.go
index d81c239ba5..0719306efb 100644
--- a/backend-go/internal/database/pg/gen/model/identity_ldap_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_ldap_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,15 +22,15 @@ type IdentityLdapAuths struct {
IdentityId uuid.UUID
EncryptedBindDN []byte
EncryptedBindPass []byte
- EncryptedLdapCaCertificate *[]byte
+ EncryptedLdapCaCertificate sql.Null[[]byte]
URL string
SearchBase string
SearchFilter string
- AllowedFields *string
+ AllowedFields sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
AccessTokenPeriod int64
- TemplateId *uuid.UUID
+ TemplateId sql.Null[uuid.UUID]
LockoutEnabled bool
LockoutThreshold int32
LockoutDurationSeconds int32
diff --git a/backend-go/internal/database/pg/gen/model/identity_metadata.go b/backend-go/internal/database/pg/gen/model/identity_metadata.go
index 30240fb0a1..80d13d3cec 100644
--- a/backend-go/internal/database/pg/gen/model/identity_metadata.go
+++ b/backend-go/internal/database/pg/gen/model/identity_metadata.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,8 +18,8 @@ type IdentityMetadata struct {
Key string
Value string
OrgId uuid.UUID
- UserId *uuid.UUID
- IdentityId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ IdentityId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_oci_auths.go b/backend-go/internal/database/pg/gen/model/identity_oci_auths.go
index bab8e96fed..5738a13f47 100644
--- a/backend-go/internal/database/pg/gen/model/identity_oci_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_oci_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -23,6 +24,6 @@ type IdentityOciAuths struct {
IdentityId uuid.UUID
Type string
TenancyOcid string
- AllowedUsernames *string
+ AllowedUsernames sql.Null[string]
AccessTokenPeriod int64
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_oidc_auths.go b/backend-go/internal/database/pg/gen/model/identity_oidc_auths.go
index a73d3b84d5..112cd85045 100644
--- a/backend-go/internal/database/pg/gen/model/identity_oidc_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_oidc_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -20,16 +21,16 @@ type IdentityOidcAuths struct {
AccessTokenTrustedIps string
IdentityId uuid.UUID
OidcDiscoveryUrl string
- EncryptedCaCert *string
- CaCertIV *string
- CaCertTag *string
+ EncryptedCaCert sql.Null[string]
+ CaCertIV sql.Null[string]
+ CaCertTag sql.Null[string]
BoundIssuer string
BoundAudiences string
BoundClaims string
- BoundSubject *string
+ BoundSubject sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
- EncryptedCaCertificate *[]byte
- ClaimMetadataMapping *string
+ EncryptedCaCertificate sql.Null[[]byte]
+ ClaimMetadataMapping sql.Null[string]
AccessTokenPeriod int64
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_spiffe_auths.go b/backend-go/internal/database/pg/gen/model/identity_spiffe_auths.go
index 4abb8168fb..e84ae24041 100644
--- a/backend-go/internal/database/pg/gen/model/identity_spiffe_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_spiffe_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -19,11 +20,11 @@ type IdentitySpiffeAuths struct {
AllowedSpiffeIds string
AllowedAudiences string
ConfigurationType string
- EncryptedCaBundleJwks *[]byte
- BundleEndpointUrl *string
- EncryptedBundleEndpointCaCert *[]byte
- EncryptedCachedBundleJwks *[]byte
- CachedBundleLastRefreshedAt *time.Time
+ EncryptedCaBundleJwks sql.Null[[]byte]
+ BundleEndpointUrl sql.Null[string]
+ EncryptedBundleEndpointCaCert sql.Null[[]byte]
+ EncryptedCachedBundleJwks sql.Null[[]byte]
+ CachedBundleLastRefreshedAt sql.NullTime
BundleRefreshHintSeconds int32
AccessTokenTTL int64
AccessTokenMaxTTL int64
diff --git a/backend-go/internal/database/pg/gen/model/identity_tls_cert_auths.go b/backend-go/internal/database/pg/gen/model/identity_tls_cert_auths.go
index bef2719fe7..6e5c7f0529 100644
--- a/backend-go/internal/database/pg/gen/model/identity_tls_cert_auths.go
+++ b/backend-go/internal/database/pg/gen/model/identity_tls_cert_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,6 +22,6 @@ type IdentityTLSCertAuths struct {
CreatedAt time.Time
UpdatedAt time.Time
IdentityId uuid.UUID
- AllowedCommonNames *string
+ AllowedCommonNames sql.Null[string]
EncryptedCaCertificate []byte
}
diff --git a/backend-go/internal/database/pg/gen/model/identity_ua_client_secrets.go b/backend-go/internal/database/pg/gen/model/identity_ua_client_secrets.go
index 16c385ebda..fb01f2fec5 100644
--- a/backend-go/internal/database/pg/gen/model/identity_ua_client_secrets.go
+++ b/backend-go/internal/database/pg/gen/model/identity_ua_client_secrets.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type IdentityUaClientSecrets struct {
Description string
ClientSecretPrefix string
ClientSecretHash string
- ClientSecretLastUsedAt *time.Time
+ ClientSecretLastUsedAt sql.NullTime
ClientSecretNumUses int64
ClientSecretNumUsesLimit int64
ClientSecretTTL int64
diff --git a/backend-go/internal/database/pg/gen/model/infisical_migrations.go b/backend-go/internal/database/pg/gen/model/infisical_migrations.go
index 2fcd451beb..14c8fbd59e 100644
--- a/backend-go/internal/database/pg/gen/model/infisical_migrations.go
+++ b/backend-go/internal/database/pg/gen/model/infisical_migrations.go
@@ -8,12 +8,12 @@
package model
import (
- "time"
+ "database/sql"
)
type InfisicalMigrations struct {
ID int32 `sql:"primary_key"`
- Name *string
- Batch *int32
- MigrationTime *time.Time
+ Name sql.Null[string]
+ Batch sql.Null[int32]
+ MigrationTime sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/infisical_migrations_lock.go b/backend-go/internal/database/pg/gen/model/infisical_migrations_lock.go
index 4ad63bd368..3fc8d09b35 100644
--- a/backend-go/internal/database/pg/gen/model/infisical_migrations_lock.go
+++ b/backend-go/internal/database/pg/gen/model/infisical_migrations_lock.go
@@ -7,7 +7,11 @@
package model
+import (
+ "database/sql"
+)
+
type InfisicalMigrationsLock struct {
Index int32 `sql:"primary_key"`
- IsLocked *int32
+ IsLocked sql.Null[int32]
}
diff --git a/backend-go/internal/database/pg/gen/model/infisical_migrations_startup_lock.go b/backend-go/internal/database/pg/gen/model/infisical_migrations_startup_lock.go
index 820ae091ab..b26c6c6dca 100644
--- a/backend-go/internal/database/pg/gen/model/infisical_migrations_startup_lock.go
+++ b/backend-go/internal/database/pg/gen/model/infisical_migrations_startup_lock.go
@@ -8,13 +8,13 @@
package model
import (
- "time"
+ "database/sql"
)
type InfisicalMigrationsStartupLock struct {
Index int32 `sql:"primary_key"`
- IsLocked *int32
- SessionID *string
- Node *string
- HeartbeatUpdatedAt *time.Time
+ IsLocked sql.Null[int32]
+ SessionID sql.Null[string]
+ Node sql.Null[string]
+ HeartbeatUpdatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/integration_auths.go b/backend-go/internal/database/pg/gen/model/integration_auths.go
index a36927fd59..ee5b838633 100644
--- a/backend-go/internal/database/pg/gen/model/integration_auths.go
+++ b/backend-go/internal/database/pg/gen/model/integration_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,31 +16,31 @@ import (
type IntegrationAuths struct {
ID uuid.UUID `sql:"primary_key"`
Integration string
- TeamId *string
- URL *string
- Namespace *string
- AccountId *string
- RefreshCiphertext *string
- RefreshIV *string
- RefreshTag *string
- AccessIdCiphertext *string
- AccessIdIV *string
- AccessIdTag *string
- AccessCiphertext *string
- AccessIV *string
- AccessTag *string
- AccessExpiresAt *time.Time
- Metadata *string
+ TeamId sql.Null[string]
+ URL sql.Null[string]
+ Namespace sql.Null[string]
+ AccountId sql.Null[string]
+ RefreshCiphertext sql.Null[string]
+ RefreshIV sql.Null[string]
+ RefreshTag sql.Null[string]
+ AccessIdCiphertext sql.Null[string]
+ AccessIdIV sql.Null[string]
+ AccessIdTag sql.Null[string]
+ AccessCiphertext sql.Null[string]
+ AccessIV sql.Null[string]
+ AccessTag sql.Null[string]
+ AccessExpiresAt sql.NullTime
+ Metadata sql.Null[string]
Algorithm string
KeyEncoding string
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
- AwsAssumeIamRoleArnCipherText *string
- AwsAssumeIamRoleArnIV *string
- AwsAssumeIamRoleArnTag *string
- EncryptedAccess *[]byte
- EncryptedAccessId *[]byte
- EncryptedRefresh *[]byte
- EncryptedAwsAssumeIamRoleArn *[]byte
+ AwsAssumeIamRoleArnCipherText sql.Null[string]
+ AwsAssumeIamRoleArnIV sql.Null[string]
+ AwsAssumeIamRoleArnTag sql.Null[string]
+ EncryptedAccess sql.Null[[]byte]
+ EncryptedAccessId sql.Null[[]byte]
+ EncryptedRefresh sql.Null[[]byte]
+ EncryptedAwsAssumeIamRoleArn sql.Null[[]byte]
}
diff --git a/backend-go/internal/database/pg/gen/model/integrations.go b/backend-go/internal/database/pg/gen/model/integrations.go
index f6e29cd6c0..cacb620dbc 100644
--- a/backend-go/internal/database/pg/gen/model/integrations.go
+++ b/backend-go/internal/database/pg/gen/model/integrations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,26 +16,26 @@ import (
type Integrations struct {
ID uuid.UUID `sql:"primary_key"`
IsActive bool
- URL *string
- App *string
- AppId *string
- TargetEnvironment *string
- TargetEnvironmentId *string
- TargetService *string
- TargetServiceId *string
- Owner *string
- Path *string
- Region *string
- Scope *string
+ URL sql.Null[string]
+ App sql.Null[string]
+ AppId sql.Null[string]
+ TargetEnvironment sql.Null[string]
+ TargetEnvironmentId sql.Null[string]
+ TargetService sql.Null[string]
+ TargetServiceId sql.Null[string]
+ Owner sql.Null[string]
+ Path sql.Null[string]
+ Region sql.Null[string]
+ Scope sql.Null[string]
Integration string
- Metadata *string
+ Metadata sql.Null[string]
IntegrationAuthId uuid.UUID
EnvId uuid.UUID
SecretPath string
CreatedAt time.Time
UpdatedAt time.Time
- LastUsed *time.Time
- IsSynced *bool
- SyncMessage *string
- LastSyncJobId *string
+ LastUsed sql.NullTime
+ IsSynced sql.Null[bool]
+ SyncMessage sql.Null[string]
+ LastSyncJobId sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/intermediate_certificate_requests.go b/backend-go/internal/database/pg/gen/model/intermediate_certificate_requests.go
index 2439e06985..fa89730b40 100644
--- a/backend-go/internal/database/pg/gen/model/intermediate_certificate_requests.go
+++ b/backend-go/internal/database/pg/gen/model/intermediate_certificate_requests.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -19,28 +20,28 @@ type IntermediateCertificateRequests struct {
UpdatedAt time.Time
Status string
ProjectId string
- ProfileId *uuid.UUID
- CaId *uuid.UUID
- CertificateId *uuid.UUID
- Csr *string
- CommonName *string
+ ProfileId sql.Null[uuid.UUID]
+ CaId sql.Null[uuid.UUID]
+ CertificateId sql.Null[uuid.UUID]
+ Csr sql.Null[string]
+ CommonName sql.Null[string]
KeyUsages *pq.StringArray
ExtendedKeyUsages *pq.StringArray
- NotBefore *time.Time
- NotAfter *time.Time
- KeyAlgorithm *string
- SignatureAlgorithm *string
- ErrorMessage *string
- Metadata *string
- AcmeOrderId *uuid.UUID
- BasicConstraints *string
- ApprovalRequestId *uuid.UUID
- TTL *string
- EnrollmentType *string
- AltNames *string
- Organization *string
- OrganizationalUnit *string
- Country *string
- State *string
- Locality *string
+ NotBefore sql.NullTime
+ NotAfter sql.NullTime
+ KeyAlgorithm sql.Null[string]
+ SignatureAlgorithm sql.Null[string]
+ ErrorMessage sql.Null[string]
+ Metadata sql.Null[string]
+ AcmeOrderId sql.Null[uuid.UUID]
+ BasicConstraints sql.Null[string]
+ ApprovalRequestId sql.Null[uuid.UUID]
+ TTL sql.Null[string]
+ EnrollmentType sql.Null[string]
+ AltNames sql.Null[string]
+ Organization sql.Null[string]
+ OrganizationalUnit sql.Null[string]
+ Country sql.Null[string]
+ State sql.Null[string]
+ Locality sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/internal_certificate_authorities.go b/backend-go/internal/database/pg/gen/model/internal_certificate_authorities.go
index 9f80133be8..1ab9de7d2c 100644
--- a/backend-go/internal/database/pg/gen/model/internal_certificate_authorities.go
+++ b/backend-go/internal/database/pg/gen/model/internal_certificate_authorities.go
@@ -8,13 +8,13 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
- "time"
)
type InternalCertificateAuthorities struct {
ID uuid.UUID `sql:"primary_key"`
- ParentCaId *uuid.UUID
+ ParentCaId sql.Null[uuid.UUID]
Type string
FriendlyName string
Organization string
@@ -24,16 +24,16 @@ type InternalCertificateAuthorities struct {
Locality string
CommonName string
Dn string
- SerialNumber *string
- MaxPathLength *int32
+ SerialNumber sql.Null[string]
+ MaxPathLength sql.Null[int32]
KeyAlgorithm string
- NotBefore *time.Time
- NotAfter *time.Time
- ActiveCaCertId *uuid.UUID
+ NotBefore sql.NullTime
+ NotAfter sql.NullTime
+ ActiveCaCertId sql.Null[uuid.UUID]
CaId uuid.UUID
AutoRenewalEnabled bool
- AutoRenewalDaysBeforeExpiry *int32
- LastRenewalStatus *string
- LastRenewalMessage *string
- LastRenewalAt *time.Time
+ AutoRenewalDaysBeforeExpiry sql.Null[int32]
+ LastRenewalStatus sql.Null[string]
+ LastRenewalMessage sql.Null[string]
+ LastRenewalAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/key_value_store.go b/backend-go/internal/database/pg/gen/model/key_value_store.go
index 36df08a4e0..c469b49419 100644
--- a/backend-go/internal/database/pg/gen/model/key_value_store.go
+++ b/backend-go/internal/database/pg/gen/model/key_value_store.go
@@ -8,13 +8,14 @@
package model
import (
+ "database/sql"
"time"
)
type KeyValueStore struct {
Key string `sql:"primary_key"`
- IntegerValue *int64
- ExpiresAt *time.Time
+ IntegerValue sql.Null[int64]
+ ExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/kmip_clients.go b/backend-go/internal/database/pg/gen/model/kmip_clients.go
index 185546d3e5..3603fe5d53 100644
--- a/backend-go/internal/database/pg/gen/model/kmip_clients.go
+++ b/backend-go/internal/database/pg/gen/model/kmip_clients.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
)
@@ -16,6 +17,6 @@ type KmipClients struct {
ID uuid.UUID `sql:"primary_key"`
Name string
Permissions *pq.StringArray
- Description *string
+ Description sql.Null[string]
ProjectId string
}
diff --git a/backend-go/internal/database/pg/gen/model/kmip_org_configs.go b/backend-go/internal/database/pg/gen/model/kmip_org_configs.go
index 7fccbfdefd..e7b8890ff2 100644
--- a/backend-go/internal/database/pg/gen/model/kmip_org_configs.go
+++ b/backend-go/internal/database/pg/gen/model/kmip_org_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -23,7 +24,7 @@ type KmipOrgConfigs struct {
EncryptedRootCaPrivateKey []byte
ServerIntermediateCaIssuedAt time.Time
ServerIntermediateCaExpiration time.Time
- ServerIntermediateCaSerialNumber *string
+ ServerIntermediateCaSerialNumber sql.Null[string]
EncryptedServerIntermediateCaCertificate []byte
EncryptedServerIntermediateCaChain []byte
EncryptedServerIntermediateCaPrivateKey []byte
diff --git a/backend-go/internal/database/pg/gen/model/kmip_org_server_certificates.go b/backend-go/internal/database/pg/gen/model/kmip_org_server_certificates.go
index 1df4c9700a..318fbb979d 100644
--- a/backend-go/internal/database/pg/gen/model/kmip_org_server_certificates.go
+++ b/backend-go/internal/database/pg/gen/model/kmip_org_server_certificates.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,7 +17,7 @@ type KmipOrgServerCertificates struct {
ID uuid.UUID `sql:"primary_key"`
OrgId uuid.UUID
CommonName string
- AltNames *string
+ AltNames sql.Null[string]
SerialNumber string
KeyAlgorithm string
IssuedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/kms_keys.go b/backend-go/internal/database/pg/gen/model/kms_keys.go
index c92462e9f9..721e28b757 100644
--- a/backend-go/internal/database/pg/gen/model/kms_keys.go
+++ b/backend-go/internal/database/pg/gen/model/kms_keys.go
@@ -8,20 +8,21 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type KmsKeys struct {
ID uuid.UUID `sql:"primary_key"`
- Description *string
- IsDisabled *bool
- IsReserved *bool
+ Description sql.Null[string]
+ IsDisabled sql.Null[bool]
+ IsReserved sql.Null[bool]
OrgId uuid.UUID
Name string
CreatedAt time.Time
UpdatedAt time.Time
- ProjectId *string
+ ProjectId sql.Null[string]
KeyUsage string
- KmipMetadata *string
+ KmipMetadata sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/kms_root_config.go b/backend-go/internal/database/pg/gen/model/kms_root_config.go
index 820dcec989..e57fa16cd5 100644
--- a/backend-go/internal/database/pg/gen/model/kms_root_config.go
+++ b/backend-go/internal/database/pg/gen/model/kms_root_config.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type KmsRootConfig struct {
ID uuid.UUID `sql:"primary_key"`
EncryptedRootKey []byte
- EncryptionStrategy *string
+ EncryptionStrategy sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/ldap_configs.go b/backend-go/internal/database/pg/gen/model/ldap_configs.go
index fc2776547c..bbe86031e1 100644
--- a/backend-go/internal/database/pg/gen/model/ldap_configs.go
+++ b/backend-go/internal/database/pg/gen/model/ldap_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,16 +18,16 @@ type LdapConfigs struct {
OrgId uuid.UUID
IsActive bool
URL string
- EncryptedBindDN *string
- BindDNIV *string
- BindDNTag *string
- EncryptedBindPass *string
- BindPassIV *string
- BindPassTag *string
+ EncryptedBindDN sql.Null[string]
+ BindDNIV sql.Null[string]
+ BindDNTag sql.Null[string]
+ EncryptedBindPass sql.Null[string]
+ BindPassIV sql.Null[string]
+ BindPassTag sql.Null[string]
SearchBase string
- EncryptedCACert *string
- CaCertIV *string
- CaCertTag *string
+ EncryptedCACert sql.Null[string]
+ CaCertIV sql.Null[string]
+ CaCertTag sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
GroupSearchBase string
@@ -35,5 +36,5 @@ type LdapConfigs struct {
UniqueUserAttribute string
EncryptedLdapBindDN []byte
EncryptedLdapBindPass []byte
- EncryptedLdapCaCertificate *[]byte
+ EncryptedLdapCaCertificate sql.Null[[]byte]
}
diff --git a/backend-go/internal/database/pg/gen/model/membership_roles.go b/backend-go/internal/database/pg/gen/model/membership_roles.go
index d1cb858e52..05b3c8435a 100644
--- a/backend-go/internal/database/pg/gen/model/membership_roles.go
+++ b/backend-go/internal/database/pg/gen/model/membership_roles.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,11 +17,11 @@ type MembershipRoles struct {
ID uuid.UUID `sql:"primary_key"`
Role string
IsTemporary bool
- TemporaryMode *string
- TemporaryRange *string
- TemporaryAccessStartTime *time.Time
- TemporaryAccessEndTime *time.Time
- CustomRoleId *uuid.UUID
+ TemporaryMode sql.Null[string]
+ TemporaryRange sql.Null[string]
+ TemporaryAccessStartTime sql.NullTime
+ TemporaryAccessEndTime sql.NullTime
+ CustomRoleId sql.Null[uuid.UUID]
MembershipId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/memberships.go b/backend-go/internal/database/pg/gen/model/memberships.go
index 57a0f83068..1aa57c9743 100644
--- a/backend-go/internal/database/pg/gen/model/memberships.go
+++ b/backend-go/internal/database/pg/gen/model/memberships.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -16,17 +17,17 @@ import (
type Memberships struct {
ID uuid.UUID `sql:"primary_key"`
Scope string
- ActorUserId *uuid.UUID
- ActorIdentityId *uuid.UUID
- ActorGroupId *uuid.UUID
+ ActorUserId sql.Null[uuid.UUID]
+ ActorIdentityId sql.Null[uuid.UUID]
+ ActorGroupId sql.Null[uuid.UUID]
ScopeOrgId uuid.UUID
- ScopeProjectId *string
+ ScopeProjectId sql.Null[string]
IsActive bool
- Status *string
- InviteEmail *string
- LastInvitedAt *time.Time
- LastLoginAuthMethod *string
- LastLoginTime *time.Time
+ Status sql.Null[string]
+ InviteEmail sql.Null[string]
+ LastInvitedAt sql.NullTime
+ LastLoginAuthMethod sql.Null[string]
+ LastLoginTime sql.NullTime
ProjectFavorites *pq.StringArray
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/microsoft_teams_integrations.go b/backend-go/internal/database/pg/gen/model/microsoft_teams_integrations.go
index f66b9c35a1..67e400ac18 100644
--- a/backend-go/internal/database/pg/gen/model/microsoft_teams_integrations.go
+++ b/backend-go/internal/database/pg/gen/model/microsoft_teams_integrations.go
@@ -8,18 +8,19 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type MicrosoftTeamsIntegrations struct {
ID uuid.UUID `sql:"primary_key"`
- InternalTeamsAppId *string
+ InternalTeamsAppId sql.Null[string]
TenantId string
- EncryptedAccessToken *[]byte
- EncryptedBotAccessToken *[]byte
- AccessTokenExpiresAt *time.Time
- BotAccessTokenExpiresAt *time.Time
+ EncryptedAccessToken sql.Null[[]byte]
+ EncryptedBotAccessToken sql.Null[[]byte]
+ AccessTokenExpiresAt sql.NullTime
+ BotAccessTokenExpiresAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/oidc_configs.go b/backend-go/internal/database/pg/gen/model/oidc_configs.go
index 378a66400c..2c2a3ee4b6 100644
--- a/backend-go/internal/database/pg/gen/model/oidc_configs.go
+++ b/backend-go/internal/database/pg/gen/model/oidc_configs.go
@@ -8,31 +8,32 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type OidcConfigs struct {
ID uuid.UUID `sql:"primary_key"`
- DiscoveryURL *string
- Issuer *string
- AuthorizationEndpoint *string
- JwksUri *string
- TokenEndpoint *string
- UserinfoEndpoint *string
- EncryptedClientId *string
+ DiscoveryURL sql.Null[string]
+ Issuer sql.Null[string]
+ AuthorizationEndpoint sql.Null[string]
+ JwksUri sql.Null[string]
+ TokenEndpoint sql.Null[string]
+ UserinfoEndpoint sql.Null[string]
+ EncryptedClientId sql.Null[string]
ConfigurationType string
- ClientIdIV *string
- ClientIdTag *string
- EncryptedClientSecret *string
- ClientSecretIV *string
- ClientSecretTag *string
- AllowedEmailDomains *string
+ ClientIdIV sql.Null[string]
+ ClientIdTag sql.Null[string]
+ EncryptedClientSecret sql.Null[string]
+ ClientSecretIV sql.Null[string]
+ ClientSecretTag sql.Null[string]
+ AllowedEmailDomains sql.Null[string]
IsActive bool
CreatedAt time.Time
UpdatedAt time.Time
OrgId uuid.UUID
- LastUsed *time.Time
+ LastUsed sql.NullTime
ManageGroupMemberships bool
EncryptedOidcClientId []byte
EncryptedOidcClientSecret []byte
diff --git a/backend-go/internal/database/pg/gen/model/org_gateway_config.go b/backend-go/internal/database/pg/gen/model/org_gateway_config.go
index 5ce37e7fd7..7a0167f25f 100644
--- a/backend-go/internal/database/pg/gen/model/org_gateway_config.go
+++ b/backend-go/internal/database/pg/gen/model/org_gateway_config.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -22,7 +23,7 @@ type OrgGatewayConfig struct {
EncryptedRootCaPrivateKey []byte
ClientCaIssuedAt time.Time
ClientCaExpiration time.Time
- ClientCaSerialNumber *string
+ ClientCaSerialNumber sql.Null[string]
EncryptedClientCaCertificate []byte
EncryptedClientCaPrivateKey []byte
ClientCertSerialNumber string
diff --git a/backend-go/internal/database/pg/gen/model/organizations.go b/backend-go/internal/database/pg/gen/model/organizations.go
index e3551f10ea..5cbc8af69f 100644
--- a/backend-go/internal/database/pg/gen/model/organizations.go
+++ b/backend-go/internal/database/pg/gen/model/organizations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,35 +16,35 @@ import (
type Organizations struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- CustomerId *string
+ CustomerId sql.Null[string]
Slug string
CreatedAt time.Time
UpdatedAt time.Time
- AuthEnforced *bool
- ScimEnabled *bool
- KmsDefaultKeyId *uuid.UUID
- KmsEncryptedDataKey *[]byte
+ AuthEnforced sql.Null[bool]
+ ScimEnabled sql.Null[bool]
+ KmsDefaultKeyId sql.Null[uuid.UUID]
+ KmsEncryptedDataKey sql.Null[[]byte]
DefaultMembershipRole string
EnforceMfa bool
- SelectedMfaMethod *string
- AllowSecretSharingOutsideOrganization *bool
+ SelectedMfaMethod sql.Null[string]
+ AllowSecretSharingOutsideOrganization sql.Null[bool]
ShouldUseNewPrivilegeSystem bool
- PrivilegeUpgradeInitiatedByUsername *string
- PrivilegeUpgradeInitiatedAt *time.Time
+ PrivilegeUpgradeInitiatedByUsername sql.Null[string]
+ PrivilegeUpgradeInitiatedAt sql.NullTime
BypassOrgAuthEnabled bool
- UserTokenExpiration *string
- SecretsProductEnabled *bool
- PkiProductEnabled *bool
- KmsProductEnabled *bool
- SshProductEnabled *bool
- ScannerProductEnabled *bool
- ShareSecretsProductEnabled *bool
- MaxSharedSecretLifetime *int32
- MaxSharedSecretViewLimit *int32
+ UserTokenExpiration sql.Null[string]
+ SecretsProductEnabled sql.Null[bool]
+ PkiProductEnabled sql.Null[bool]
+ KmsProductEnabled sql.Null[bool]
+ SshProductEnabled sql.Null[bool]
+ ScannerProductEnabled sql.Null[bool]
+ ShareSecretsProductEnabled sql.Null[bool]
+ MaxSharedSecretLifetime sql.Null[int32]
+ MaxSharedSecretViewLimit sql.Null[int32]
GoogleSsoAuthEnforced bool
- GoogleSsoAuthLastUsed *time.Time
- ParentOrgId *uuid.UUID
- RootOrgId *uuid.UUID
+ GoogleSsoAuthLastUsed sql.NullTime
+ ParentOrgId sql.Null[uuid.UUID]
+ RootOrgId sql.Null[uuid.UUID]
BlockDuplicateSecretSyncDestinations bool
- SecretShareBrandConfig *string
+ SecretShareBrandConfig sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_account_dependencies.go b/backend-go/internal/database/pg/gen/model/pam_account_dependencies.go
index 9ef3d3dcb6..2eb0e78fa4 100644
--- a/backend-go/internal/database/pg/gen/model/pam_account_dependencies.go
+++ b/backend-go/internal/database/pg/gen/model/pam_account_dependencies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,11 +19,11 @@ type PamAccountDependencies struct {
ResourceId uuid.UUID
DependencyType string
Name string
- DisplayName *string
- State *string
+ DisplayName sql.Null[string]
+ State sql.Null[string]
Data string
Source string
- IsEnabled *bool
+ IsEnabled sql.Null[bool]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_accounts.go b/backend-go/internal/database/pg/gen/model/pam_accounts.go
index 0e67a0a1f7..284992d95f 100644
--- a/backend-go/internal/database/pg/gen/model/pam_accounts.go
+++ b/backend-go/internal/database/pg/gen/model/pam_accounts.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,19 +16,19 @@ import (
type PamAccounts struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- FolderId *uuid.UUID
+ FolderId sql.Null[uuid.UUID]
ResourceId uuid.UUID
Name string
- Description *string
+ Description sql.Null[string]
EncryptedCredentials []byte
CreatedAt time.Time
UpdatedAt time.Time
RotationEnabled bool
- RotationIntervalSeconds *int32
- LastRotatedAt *time.Time
- RotationStatus *string
- EncryptedLastRotationMessage *[]byte
- RequireMfa *bool
- InternalMetadata *string
- DiscoveryFingerprint *string
+ RotationIntervalSeconds sql.Null[int32]
+ LastRotatedAt sql.NullTime
+ RotationStatus sql.Null[string]
+ EncryptedLastRotationMessage sql.Null[[]byte]
+ RequireMfa sql.Null[bool]
+ InternalMetadata sql.Null[string]
+ DiscoveryFingerprint sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_discovery_source_accounts.go b/backend-go/internal/database/pg/gen/model/pam_discovery_source_accounts.go
index 463958ecd1..0ae9deb046 100644
--- a/backend-go/internal/database/pg/gen/model/pam_discovery_source_accounts.go
+++ b/backend-go/internal/database/pg/gen/model/pam_discovery_source_accounts.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type PamDiscoverySourceAccounts struct {
DiscoverySourceId uuid.UUID
AccountId uuid.UUID
LastDiscoveredAt time.Time
- LastDiscoveredRunId *uuid.UUID
- IsStale *bool
- CreatedAt *time.Time
+ LastDiscoveredRunId sql.Null[uuid.UUID]
+ IsStale sql.Null[bool]
+ CreatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_discovery_source_dependencies.go b/backend-go/internal/database/pg/gen/model/pam_discovery_source_dependencies.go
index 0266ef2691..241b58a976 100644
--- a/backend-go/internal/database/pg/gen/model/pam_discovery_source_dependencies.go
+++ b/backend-go/internal/database/pg/gen/model/pam_discovery_source_dependencies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type PamDiscoverySourceDependencies struct {
DiscoverySourceId uuid.UUID
DependencyId uuid.UUID
LastSeenAt time.Time
- LastSeenRunId *uuid.UUID
- IsStale *bool
- CreatedAt *time.Time
+ LastSeenRunId sql.Null[uuid.UUID]
+ IsStale sql.Null[bool]
+ CreatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_discovery_source_resources.go b/backend-go/internal/database/pg/gen/model/pam_discovery_source_resources.go
index b735fdd4c1..0129a30626 100644
--- a/backend-go/internal/database/pg/gen/model/pam_discovery_source_resources.go
+++ b/backend-go/internal/database/pg/gen/model/pam_discovery_source_resources.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type PamDiscoverySourceResources struct {
DiscoverySourceId uuid.UUID
ResourceId uuid.UUID
LastDiscoveredAt time.Time
- LastDiscoveredRunId *uuid.UUID
- IsStale *bool
- CreatedAt *time.Time
+ LastDiscoveredRunId sql.Null[uuid.UUID]
+ IsStale sql.Null[bool]
+ CreatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_discovery_source_runs.go b/backend-go/internal/database/pg/gen/model/pam_discovery_source_runs.go
index 53d0881283..337dc36e08 100644
--- a/backend-go/internal/database/pg/gen/model/pam_discovery_source_runs.go
+++ b/backend-go/internal/database/pg/gen/model/pam_discovery_source_runs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,19 +18,19 @@ type PamDiscoverySourceRuns struct {
DiscoverySourceId uuid.UUID
Status string
TriggeredBy string
- ResourcesDiscoveredCount *int32
- AccountsDiscoveredCount *int32
- DependenciesDiscoveredCount *int32
- NewResourcesCount *int32
- StaleResourcesCount *int32
- NewAccountsCount *int32
- StaleAccountsCount *int32
- NewDependenciesCount *int32
- StaleDependenciesCount *int32
+ ResourcesDiscoveredCount sql.Null[int32]
+ AccountsDiscoveredCount sql.Null[int32]
+ DependenciesDiscoveredCount sql.Null[int32]
+ NewResourcesCount sql.Null[int32]
+ StaleResourcesCount sql.Null[int32]
+ NewAccountsCount sql.Null[int32]
+ StaleAccountsCount sql.Null[int32]
+ NewDependenciesCount sql.Null[int32]
+ StaleDependenciesCount sql.Null[int32]
Progress string
- ErrorMessage *string
- StartedAt *time.Time
- CompletedAt *time.Time
+ ErrorMessage sql.Null[string]
+ StartedAt sql.NullTime
+ CompletedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_discovery_sources.go b/backend-go/internal/database/pg/gen/model/pam_discovery_sources.go
index ce790823cb..2920ee1da2 100644
--- a/backend-go/internal/database/pg/gen/model/pam_discovery_sources.go
+++ b/backend-go/internal/database/pg/gen/model/pam_discovery_sources.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,7 +22,7 @@ type PamDiscoverySources struct {
EncryptedDiscoveryCredentials []byte
DiscoveryConfiguration string
Schedule string
- LastRunAt *time.Time
+ LastRunAt sql.NullTime
Status string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/pam_folders.go b/backend-go/internal/database/pg/gen/model/pam_folders.go
index 67cf7aa6ab..f0914b6a20 100644
--- a/backend-go/internal/database/pg/gen/model/pam_folders.go
+++ b/backend-go/internal/database/pg/gen/model/pam_folders.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,9 +16,9 @@ import (
type PamFolders struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- ParentId *uuid.UUID
+ ParentId sql.Null[uuid.UUID]
Name string
- Description *string
+ Description sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_resources.go b/backend-go/internal/database/pg/gen/model/pam_resources.go
index 0404a66741..e273950b60 100644
--- a/backend-go/internal/database/pg/gen/model/pam_resources.go
+++ b/backend-go/internal/database/pg/gen/model/pam_resources.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,13 +17,13 @@ type PamResources struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
Name string
- GatewayId *uuid.UUID
+ GatewayId sql.Null[uuid.UUID]
ResourceType string
EncryptedConnectionDetails []byte
CreatedAt time.Time
UpdatedAt time.Time
- EncryptedRotationAccountCredentials *[]byte
- EncryptedResourceMetadata *[]byte
- AdServerResourceId *uuid.UUID
- DiscoveryFingerprint *string
+ EncryptedRotationAccountCredentials sql.Null[[]byte]
+ EncryptedResourceMetadata sql.Null[[]byte]
+ AdServerResourceId sql.Null[uuid.UUID]
+ DiscoveryFingerprint sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pam_sessions.go b/backend-go/internal/database/pg/gen/model/pam_sessions.go
index bdef5b4064..9adf5788f4 100644
--- a/backend-go/internal/database/pg/gen/model/pam_sessions.go
+++ b/backend-go/internal/database/pg/gen/model/pam_sessions.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,21 +16,21 @@ import (
type PamSessions struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- AccountId *uuid.UUID
+ AccountId sql.Null[uuid.UUID]
ResourceType string
ResourceName string
AccountName string
- UserId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
ActorName string
ActorEmail string
ActorIp string
ActorUserAgent string
Status string
- EncryptedLogsBlob *[]byte
+ EncryptedLogsBlob sql.Null[[]byte]
ExpiresAt time.Time
- StartedAt *time.Time
- EndedAt *time.Time
+ StartedAt sql.NullTime
+ EndedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
- AccessMethod *string
+ AccessMethod sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_acme_auths.go b/backend-go/internal/database/pg/gen/model/pki_acme_auths.go
index 124a5f5f7f..3591143ce5 100644
--- a/backend-go/internal/database/pg/gen/model/pki_acme_auths.go
+++ b/backend-go/internal/database/pg/gen/model/pki_acme_auths.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,11 +17,11 @@ type PkiAcmeAuths struct {
ID uuid.UUID `sql:"primary_key"`
AccountId uuid.UUID
Status string
- Token *string
+ Token sql.Null[string]
IdentifierType string
IdentifierValue string
ExpiresAt time.Time
- CertificateId *uuid.UUID
+ CertificateId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_acme_challenges.go b/backend-go/internal/database/pg/gen/model/pki_acme_challenges.go
index 29c6983667..8bdcf6763a 100644
--- a/backend-go/internal/database/pg/gen/model/pki_acme_challenges.go
+++ b/backend-go/internal/database/pg/gen/model/pki_acme_challenges.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,8 +18,8 @@ type PkiAcmeChallenges struct {
AuthId uuid.UUID
Type string
Status string
- Error *string
- ValidatedAt *time.Time
+ Error sql.Null[string]
+ ValidatedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_acme_orders.go b/backend-go/internal/database/pg/gen/model/pki_acme_orders.go
index 91a3ce83a3..5c7f7feead 100644
--- a/backend-go/internal/database/pg/gen/model/pki_acme_orders.go
+++ b/backend-go/internal/database/pg/gen/model/pki_acme_orders.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,12 +16,12 @@ import (
type PkiAcmeOrders struct {
ID uuid.UUID `sql:"primary_key"`
AccountId uuid.UUID
- CertificateId *uuid.UUID
- NotBefore *time.Time
- NotAfter *time.Time
+ CertificateId sql.Null[uuid.UUID]
+ NotBefore sql.NullTime
+ NotAfter sql.NullTime
ExpiresAt time.Time
- Csr *string
- Error *string
+ Csr sql.Null[string]
+ Error sql.Null[string]
Status string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/pki_alert_channels.go b/backend-go/internal/database/pg/gen/model/pki_alert_channels.go
index 0e72bb033f..409f2a6555 100644
--- a/backend-go/internal/database/pg/gen/model/pki_alert_channels.go
+++ b/backend-go/internal/database/pg/gen/model/pki_alert_channels.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,9 +17,9 @@ type PkiAlertChannels struct {
ID uuid.UUID `sql:"primary_key"`
AlertId uuid.UUID
ChannelType string
- Config *string
- Enabled *bool
+ Config sql.Null[string]
+ Enabled sql.Null[bool]
CreatedAt time.Time
UpdatedAt time.Time
- EncryptedConfig *[]byte
+ EncryptedConfig sql.Null[[]byte]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_alert_history.go b/backend-go/internal/database/pg/gen/model/pki_alert_history.go
index ba8e8d6523..55f0386898 100644
--- a/backend-go/internal/database/pg/gen/model/pki_alert_history.go
+++ b/backend-go/internal/database/pg/gen/model/pki_alert_history.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,9 +16,9 @@ import (
type PkiAlertHistory struct {
ID uuid.UUID `sql:"primary_key"`
AlertId uuid.UUID
- TriggeredAt *time.Time
- HasNotificationSent *bool
- NotificationError *string
+ TriggeredAt sql.NullTime
+ HasNotificationSent sql.Null[bool]
+ NotificationError sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_alerts_v2.go b/backend-go/internal/database/pg/gen/model/pki_alerts_v2.go
index 7f237c79db..5125119348 100644
--- a/backend-go/internal/database/pg/gen/model/pki_alerts_v2.go
+++ b/backend-go/internal/database/pg/gen/model/pki_alerts_v2.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,13 +16,13 @@ import (
type PkiAlertsV2 struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
EventType string
- AlertBefore *string
- Filters *string
- Enabled *bool
+ AlertBefore sql.Null[string]
+ Filters sql.Null[string]
+ Enabled sql.Null[bool]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
- NotificationConfig *string
+ NotificationConfig sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_api_enrollment_configs.go b/backend-go/internal/database/pg/gen/model/pki_api_enrollment_configs.go
index c1fdf46d1d..51bcc9ed9a 100644
--- a/backend-go/internal/database/pg/gen/model/pki_api_enrollment_configs.go
+++ b/backend-go/internal/database/pg/gen/model/pki_api_enrollment_configs.go
@@ -8,14 +8,15 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type PkiAPIEnrollmentConfigs struct {
ID uuid.UUID `sql:"primary_key"`
- AutoRenew *bool
- RenewBeforeDays *int32
+ AutoRenew sql.Null[bool]
+ RenewBeforeDays sql.Null[int32]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_certificate_installations.go b/backend-go/internal/database/pg/gen/model/pki_certificate_installations.go
index 0336cfe28e..f2438b79eb 100644
--- a/backend-go/internal/database/pg/gen/model/pki_certificate_installations.go
+++ b/backend-go/internal/database/pg/gen/model/pki_certificate_installations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -18,9 +19,9 @@ type PkiCertificateInstallations struct {
LocationType string
LocationDetails string
LocationFingerprint string
- Name *string
+ Name sql.Null[string]
Type string
- Metadata *string
+ Metadata sql.Null[string]
LastSeenAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/pki_certificate_policies.go b/backend-go/internal/database/pg/gen/model/pki_certificate_policies.go
index 7553e1e3d0..dde271c641 100644
--- a/backend-go/internal/database/pg/gen/model/pki_certificate_policies.go
+++ b/backend-go/internal/database/pg/gen/model/pki_certificate_policies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,14 +17,14 @@ type PkiCertificatePolicies struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
Name string
- Description *string
- Subject *string
- Sans *string
- KeyUsages *string
- ExtendedKeyUsages *string
- Algorithms *string
- Validity *string
+ Description sql.Null[string]
+ Subject sql.Null[string]
+ Sans sql.Null[string]
+ KeyUsages sql.Null[string]
+ ExtendedKeyUsages sql.Null[string]
+ Algorithms sql.Null[string]
+ Validity sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
- BasicConstraints *string
+ BasicConstraints sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_certificate_profiles.go b/backend-go/internal/database/pg/gen/model/pki_certificate_profiles.go
index 4f57cb61e4..61cf5dd0f8 100644
--- a/backend-go/internal/database/pg/gen/model/pki_certificate_profiles.go
+++ b/backend-go/internal/database/pg/gen/model/pki_certificate_profiles.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,17 +16,17 @@ import (
type PkiCertificateProfiles struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- CaId *uuid.UUID
+ CaId sql.Null[uuid.UUID]
CertificatePolicyId uuid.UUID
Slug string
- Description *string
+ Description sql.Null[string]
EnrollmentType string
- EstConfigId *uuid.UUID
- ApiConfigId *uuid.UUID
+ EstConfigId sql.Null[uuid.UUID]
+ ApiConfigId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
- AcmeConfigId *uuid.UUID
+ AcmeConfigId sql.Null[uuid.UUID]
IssuerType string
- ExternalConfigs *string
- Defaults *string
+ ExternalConfigs sql.Null[string]
+ Defaults sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_collection_items.go b/backend-go/internal/database/pg/gen/model/pki_collection_items.go
index 9097b9f2be..b0e87addc8 100644
--- a/backend-go/internal/database/pg/gen/model/pki_collection_items.go
+++ b/backend-go/internal/database/pg/gen/model/pki_collection_items.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,6 +18,6 @@ type PkiCollectionItems struct {
CreatedAt time.Time
UpdatedAt time.Time
PkiCollectionId uuid.UUID
- CaId *uuid.UUID
- CertId *uuid.UUID
+ CaId sql.Null[uuid.UUID]
+ CertId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_discovery_configs.go b/backend-go/internal/database/pg/gen/model/pki_discovery_configs.go
index 89fa626203..e8dc03c8f9 100644
--- a/backend-go/internal/database/pg/gen/model/pki_discovery_configs.go
+++ b/backend-go/internal/database/pg/gen/model/pki_discovery_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,17 +17,17 @@ type PkiDiscoveryConfigs struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
Name string
- Description *string
+ Description sql.Null[string]
DiscoveryType string
TargetConfig string
IsAutoScanEnabled bool
- ScanIntervalDays *int32
- GatewayId *uuid.UUID
+ ScanIntervalDays sql.Null[int32]
+ GatewayId sql.Null[uuid.UUID]
IsActive bool
- LastScanStatus *string
- LastScanJobId *string
- LastScanMessage *string
- LastScannedAt *time.Time
+ LastScanStatus sql.Null[string]
+ LastScanJobId sql.Null[string]
+ LastScanMessage sql.Null[string]
+ LastScannedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_discovery_scan_history.go b/backend-go/internal/database/pg/gen/model/pki_discovery_scan_history.go
index f53880abc0..83fb73dabf 100644
--- a/backend-go/internal/database/pg/gen/model/pki_discovery_scan_history.go
+++ b/backend-go/internal/database/pg/gen/model/pki_discovery_scan_history.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,12 +17,12 @@ type PkiDiscoveryScanHistory struct {
ID uuid.UUID `sql:"primary_key"`
DiscoveryConfigId uuid.UUID
StartedAt time.Time
- CompletedAt *time.Time
+ CompletedAt sql.NullTime
Status string
TargetsScannedCount int32
CertificatesFoundCount int32
InstallationsFoundCount int32
- ErrorMessage *string
+ ErrorMessage sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_est_enrollment_configs.go b/backend-go/internal/database/pg/gen/model/pki_est_enrollment_configs.go
index b6564a6a8a..19a14dd11b 100644
--- a/backend-go/internal/database/pg/gen/model/pki_est_enrollment_configs.go
+++ b/backend-go/internal/database/pg/gen/model/pki_est_enrollment_configs.go
@@ -8,15 +8,16 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type PkiEstEnrollmentConfigs struct {
ID uuid.UUID `sql:"primary_key"`
- DisableBootstrapCaValidation *bool
+ DisableBootstrapCaValidation sql.Null[bool]
HashedPassphrase string
- EncryptedCaChain *[]byte
+ EncryptedCaChain sql.Null[[]byte]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_subscribers.go b/backend-go/internal/database/pg/gen/model/pki_subscribers.go
index 0940105175..3ab6dc53ca 100644
--- a/backend-go/internal/database/pg/gen/model/pki_subscribers.go
+++ b/backend-go/internal/database/pg/gen/model/pki_subscribers.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -18,19 +19,19 @@ type PkiSubscribers struct {
CreatedAt time.Time
UpdatedAt time.Time
ProjectId string
- CaId *uuid.UUID
+ CaId sql.Null[uuid.UUID]
Name string
CommonName string
SubjectAlternativeNames pq.StringArray
- TTL *string
+ TTL sql.Null[string]
KeyUsages pq.StringArray
ExtendedKeyUsages pq.StringArray
Status string
EnableAutoRenewal bool
- AutoRenewalPeriodInDays *int32
- LastAutoRenewAt *time.Time
- LastOperationStatus *string
- LastOperationMessage *string
- LastOperationAt *time.Time
- Properties *string
+ AutoRenewalPeriodInDays sql.Null[int32]
+ LastAutoRenewAt sql.NullTime
+ LastOperationStatus sql.Null[string]
+ LastOperationMessage sql.Null[string]
+ LastOperationAt sql.NullTime
+ Properties sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/pki_syncs.go b/backend-go/internal/database/pg/gen/model/pki_syncs.go
index 44948a09cc..76825e5e53 100644
--- a/backend-go/internal/database/pg/gen/model/pki_syncs.go
+++ b/backend-go/internal/database/pg/gen/model/pki_syncs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,27 +16,27 @@ import (
type PkiSyncs struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
Destination string
IsAutoSyncEnabled bool
Version int32
DestinationConfig string
SyncOptions string
ProjectId string
- SubscriberId *uuid.UUID
+ SubscriberId sql.Null[uuid.UUID]
ConnectionId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- SyncStatus *string
- LastSyncJobId *string
- LastSyncMessage *string
- LastSyncedAt *time.Time
- ImportStatus *string
- LastImportJobId *string
- LastImportMessage *string
- LastImportedAt *time.Time
- RemoveStatus *string
- LastRemoveJobId *string
- LastRemoveMessage *string
- LastRemovedAt *time.Time
+ SyncStatus sql.Null[string]
+ LastSyncJobId sql.Null[string]
+ LastSyncMessage sql.Null[string]
+ LastSyncedAt sql.NullTime
+ ImportStatus sql.Null[string]
+ LastImportJobId sql.Null[string]
+ LastImportMessage sql.Null[string]
+ LastImportedAt sql.NullTime
+ RemoveStatus sql.Null[string]
+ LastRemoveJobId sql.Null[string]
+ LastRemoveMessage sql.Null[string]
+ LastRemovedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/project_bots.go b/backend-go/internal/database/pg/gen/model/project_bots.go
index a39aff6019..2aec158db9 100644
--- a/backend-go/internal/database/pg/gen/model/project_bots.go
+++ b/backend-go/internal/database/pg/gen/model/project_bots.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -22,10 +23,10 @@ type ProjectBots struct {
Tag string
Algorithm string
KeyEncoding string
- EncryptedProjectKey *string
- EncryptedProjectKeyNonce *string
+ EncryptedProjectKey sql.Null[string]
+ EncryptedProjectKeyNonce sql.Null[string]
ProjectId string
- SenderId *uuid.UUID
+ SenderId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/project_keys.go b/backend-go/internal/database/pg/gen/model/project_keys.go
index d77966c889..f9b4570cf0 100644
--- a/backend-go/internal/database/pg/gen/model/project_keys.go
+++ b/backend-go/internal/database/pg/gen/model/project_keys.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type ProjectKeys struct {
EncryptedKey string
Nonce string
ReceiverId uuid.UUID
- SenderId *uuid.UUID
+ SenderId sql.Null[uuid.UUID]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/project_ssh_configs.go b/backend-go/internal/database/pg/gen/model/project_ssh_configs.go
index 56bc85eaee..45b3958566 100644
--- a/backend-go/internal/database/pg/gen/model/project_ssh_configs.go
+++ b/backend-go/internal/database/pg/gen/model/project_ssh_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,6 +18,6 @@ type ProjectSSHConfigs struct {
CreatedAt time.Time
UpdatedAt time.Time
ProjectId string
- DefaultUserSshCaId *uuid.UUID
- DefaultHostSshCaId *uuid.UUID
+ DefaultUserSshCaId sql.Null[uuid.UUID]
+ DefaultHostSshCaId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/project_templates.go b/backend-go/internal/database/pg/gen/model/project_templates.go
index 617f618caf..b6b1fa90c5 100644
--- a/backend-go/internal/database/pg/gen/model/project_templates.go
+++ b/backend-go/internal/database/pg/gen/model/project_templates.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,12 +16,12 @@ import (
type ProjectTemplates struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
Roles string
- Environments *string
+ Environments sql.Null[string]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
Type string
- ProjectManagedIdentities *string
+ ProjectManagedIdentities sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/projects.go b/backend-go/internal/database/pg/gen/model/projects.go
index dc7e9514f4..d8838e8edb 100644
--- a/backend-go/internal/database/pg/gen/model/projects.go
+++ b/backend-go/internal/database/pg/gen/model/projects.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -17,24 +18,24 @@ type Projects struct {
ID string `sql:"primary_key"`
Name string
Slug string
- AutoCapitalization *bool
+ AutoCapitalization sql.Null[bool]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
Version int32
- UpgradeStatus *string
+ UpgradeStatus sql.Null[string]
PitVersionLimit int32
- KmsCertificateKeyId *uuid.UUID
- AuditLogsRetentionDays *int32
- KmsSecretManagerKeyId *uuid.UUID
- KmsSecretManagerEncryptedDataKey *[]byte
- Description *string
+ KmsCertificateKeyId sql.Null[uuid.UUID]
+ AuditLogsRetentionDays sql.Null[int32]
+ KmsSecretManagerKeyId sql.Null[uuid.UUID]
+ KmsSecretManagerEncryptedDataKey sql.Null[[]byte]
+ Description sql.Null[string]
Type string
EnforceCapitalization bool
- HasDeleteProtection *bool
+ HasDeleteProtection sql.Null[bool]
SecretSharing bool
ShowSnapshotsLegacy bool
- DefaultProduct *string
+ DefaultProduct sql.Null[string]
SecretDetectionIgnoreValues *pq.StringArray
- EnforceEncryptedSecretManagerSecretMetadata *bool
+ EnforceEncryptedSecretManagerSecretMetadata sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/queue_jobs.go b/backend-go/internal/database/pg/gen/model/queue_jobs.go
index d49dfb88de..cc4874ede5 100644
--- a/backend-go/internal/database/pg/gen/model/queue_jobs.go
+++ b/backend-go/internal/database/pg/gen/model/queue_jobs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -19,14 +20,14 @@ type QueueJobs struct {
QueueJobName string
JobId string
QueueData string
- QueueOptions *string
+ QueueOptions sql.Null[string]
Status string
Attempts int32
MaxAttempts int32
- ErrorMessage *string
- LastHeartBeat *time.Time
- StartedAt *time.Time
- CompletedAt *time.Time
+ ErrorMessage sql.Null[string]
+ LastHeartBeat sql.NullTime
+ StartedAt sql.NullTime
+ CompletedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/relays.go b/backend-go/internal/database/pg/gen/model/relays.go
index 077a9d289d..e0bc2575b5 100644
--- a/backend-go/internal/database/pg/gen/model/relays.go
+++ b/backend-go/internal/database/pg/gen/model/relays.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,10 +17,10 @@ type Relays struct {
ID uuid.UUID `sql:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
- OrgId *uuid.UUID
- IdentityId *uuid.UUID
+ OrgId sql.Null[uuid.UUID]
+ IdentityId sql.Null[uuid.UUID]
Name string
Host string
- Heartbeat *time.Time
- HealthAlertedAt *time.Time
+ Heartbeat sql.NullTime
+ HealthAlertedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/reminders.go b/backend-go/internal/database/pg/gen/model/reminders.go
index 77374e4549..2877359f0d 100644
--- a/backend-go/internal/database/pg/gen/model/reminders.go
+++ b/backend-go/internal/database/pg/gen/model/reminders.go
@@ -8,17 +8,18 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type Reminders struct {
ID uuid.UUID `sql:"primary_key"`
- SecretId *uuid.UUID
- Message *string
- RepeatDays *int32
+ SecretId sql.Null[uuid.UUID]
+ Message sql.Null[string]
+ RepeatDays sql.Null[int32]
NextReminderDate time.Time
CreatedAt time.Time
UpdatedAt time.Time
- FromDate *time.Time
+ FromDate sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/resource_metadata.go b/backend-go/internal/database/pg/gen/model/resource_metadata.go
index 52631f7ba5..da88394ed0 100644
--- a/backend-go/internal/database/pg/gen/model/resource_metadata.go
+++ b/backend-go/internal/database/pg/gen/model/resource_metadata.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,18 +16,18 @@ import (
type ResourceMetadata struct {
ID uuid.UUID `sql:"primary_key"`
Key string
- Value *string
+ Value sql.Null[string]
OrgId uuid.UUID
- UserId *uuid.UUID
- IdentityId *uuid.UUID
- SecretId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ IdentityId sql.Null[uuid.UUID]
+ SecretId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
- DynamicSecretId *uuid.UUID
- EncryptedValue *[]byte
- CertificateId *uuid.UUID
- CertificateRequestId *uuid.UUID
- CertificateRequestCreatedAt *time.Time
- PamResourceId *uuid.UUID
- PamAccountId *uuid.UUID
+ DynamicSecretId sql.Null[uuid.UUID]
+ EncryptedValue sql.Null[[]byte]
+ CertificateId sql.Null[uuid.UUID]
+ CertificateRequestId sql.Null[uuid.UUID]
+ CertificateRequestCreatedAt sql.NullTime
+ PamResourceId sql.Null[uuid.UUID]
+ PamAccountId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/roles.go b/backend-go/internal/database/pg/gen/model/roles.go
index 5674d08cbd..a2ad186160 100644
--- a/backend-go/internal/database/pg/gen/model/roles.go
+++ b/backend-go/internal/database/pg/gen/model/roles.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,11 +16,11 @@ import (
type Roles struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
Slug string
Permissions string
- OrgId *uuid.UUID
- ProjectId *string
+ OrgId sql.Null[uuid.UUID]
+ ProjectId sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/saml_configs.go b/backend-go/internal/database/pg/gen/model/saml_configs.go
index 410070a1b7..75156330c0 100644
--- a/backend-go/internal/database/pg/gen/model/saml_configs.go
+++ b/backend-go/internal/database/pg/gen/model/saml_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,19 +17,19 @@ type SamlConfigs struct {
ID uuid.UUID `sql:"primary_key"`
AuthProvider string
IsActive bool
- EncryptedEntryPoint *string
- EntryPointIV *string
- EntryPointTag *string
- EncryptedIssuer *string
- IssuerTag *string
- IssuerIV *string
- EncryptedCert *string
- CertIV *string
- CertTag *string
+ EncryptedEntryPoint sql.Null[string]
+ EntryPointIV sql.Null[string]
+ EntryPointTag sql.Null[string]
+ EncryptedIssuer sql.Null[string]
+ IssuerTag sql.Null[string]
+ IssuerIV sql.Null[string]
+ EncryptedCert sql.Null[string]
+ CertIV sql.Null[string]
+ CertTag sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
OrgId uuid.UUID
- LastUsed *time.Time
+ LastUsed sql.NullTime
EncryptedSamlEntryPoint []byte
EncryptedSamlIssuer []byte
EncryptedSamlCertificate []byte
diff --git a/backend-go/internal/database/pg/gen/model/scim_events.go b/backend-go/internal/database/pg/gen/model/scim_events.go
index 2a3a86fe02..4331fdba62 100644
--- a/backend-go/internal/database/pg/gen/model/scim_events.go
+++ b/backend-go/internal/database/pg/gen/model/scim_events.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,8 +16,8 @@ import (
type ScimEvents struct {
ID uuid.UUID `sql:"primary_key"`
OrgId uuid.UUID
- EventType *string
- Event *string
+ EventType sql.Null[string]
+ Event sql.Null[string]
CreatedAt time.Time `sql:"primary_key"`
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/scim_tokens.go b/backend-go/internal/database/pg/gen/model/scim_tokens.go
index ac39f6fe7b..96b173cc42 100644
--- a/backend-go/internal/database/pg/gen/model/scim_tokens.go
+++ b/backend-go/internal/database/pg/gen/model/scim_tokens.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -19,5 +20,5 @@ type ScimTokens struct {
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- ExpiryNotificationSent *bool
+ ExpiryNotificationSent sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_policies.go b/backend-go/internal/database/pg/gen/model/secret_approval_policies.go
index 7f10b0d31c..754cfaa09a 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_policies.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_policies.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,6 +22,6 @@ type SecretApprovalPolicies struct {
CreatedAt time.Time
UpdatedAt time.Time
EnforcementLevel string
- DeletedAt *time.Time
+ DeletedAt sql.NullTime
AllowedSelfApprovals bool
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_policies_approvers.go b/backend-go/internal/database/pg/gen/model/secret_approval_policies_approvers.go
index 13c98141fa..387677c984 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_policies_approvers.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_policies_approvers.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,6 +18,6 @@ type SecretApprovalPoliciesApprovers struct {
PolicyId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- ApproverUserId *uuid.UUID
- ApproverGroupId *uuid.UUID
+ ApproverUserId sql.Null[uuid.UUID]
+ ApproverGroupId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_policies_bypassers.go b/backend-go/internal/database/pg/gen/model/secret_approval_policies_bypassers.go
index cc00bea088..fe0a99a8ad 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_policies_bypassers.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_policies_bypassers.go
@@ -8,14 +8,15 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretApprovalPoliciesBypassers struct {
ID uuid.UUID `sql:"primary_key"`
- BypasserGroupId *uuid.UUID
- BypasserUserId *uuid.UUID
+ BypasserGroupId sql.Null[uuid.UUID]
+ BypasserUserId sql.Null[uuid.UUID]
PolicyId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_requests.go b/backend-go/internal/database/pg/gen/model/secret_approval_requests.go
index e1f864f736..a7f9f70294 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_requests.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_requests.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,13 +18,13 @@ type SecretApprovalRequests struct {
PolicyId uuid.UUID
HasMerged bool
Status string
- Conflicts *string
+ Conflicts sql.Null[string]
Slug string
FolderId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- IsReplicated *bool
- CommitterUserId *uuid.UUID
- StatusChangedByUserId *uuid.UUID
- BypassReason *string
+ IsReplicated sql.Null[bool]
+ CommitterUserId sql.Null[uuid.UUID]
+ StatusChangedByUserId sql.Null[uuid.UUID]
+ BypassReason sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_requests_reviewers.go b/backend-go/internal/database/pg/gen/model/secret_approval_requests_reviewers.go
index d44374995b..aa2c4676e5 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_requests_reviewers.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_requests_reviewers.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -19,5 +20,5 @@ type SecretApprovalRequestsReviewers struct {
CreatedAt time.Time
UpdatedAt time.Time
ReviewerUserId uuid.UUID
- Comment *string
+ Comment sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets.go b/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets.go
index 5872d88450..61d9ad1acc 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets.go
@@ -8,33 +8,34 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretApprovalRequestsSecrets struct {
ID uuid.UUID `sql:"primary_key"`
- Version *int32
- SecretBlindIndex *string
+ Version sql.Null[int32]
+ SecretBlindIndex sql.Null[string]
SecretKeyCiphertext string
SecretKeyIV string
SecretKeyTag string
SecretValueCiphertext string
SecretValueIV string
SecretValueTag string
- SecretCommentCiphertext *string
- SecretCommentIV *string
- SecretCommentTag *string
- SecretReminderNote *string
- SecretReminderRepeatDays *int32
- SkipMultilineEncoding *bool
+ SecretCommentCiphertext sql.Null[string]
+ SecretCommentIV sql.Null[string]
+ SecretCommentTag sql.Null[string]
+ SecretReminderNote sql.Null[string]
+ SecretReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
Algorithm string
KeyEncoding string
- Metadata *string
+ Metadata sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
RequestId uuid.UUID
Op string
- SecretId *uuid.UUID
- SecretVersion *uuid.UUID
+ SecretId sql.Null[uuid.UUID]
+ SecretVersion sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets_v2.go b/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets_v2.go
index fca30a84c7..51e144accd 100644
--- a/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets_v2.go
+++ b/backend-go/internal/database/pg/gen/model/secret_approval_requests_secrets_v2.go
@@ -8,26 +8,27 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretApprovalRequestsSecretsV2 struct {
ID uuid.UUID `sql:"primary_key"`
- Version *int32
+ Version sql.Null[int32]
Key string
- EncryptedValue *[]byte
- EncryptedComment *[]byte
- ReminderNote *string
- ReminderRepeatDays *int32
- SkipMultilineEncoding *bool
- Metadata *string
+ EncryptedValue sql.Null[[]byte]
+ EncryptedComment sql.Null[[]byte]
+ ReminderNote sql.Null[string]
+ ReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
+ Metadata sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
RequestId uuid.UUID
Op string
- SecretId *uuid.UUID
- SecretVersion *uuid.UUID
- SecretMetadata *string
- InternalMetadata *string
+ SecretId sql.Null[uuid.UUID]
+ SecretVersion sql.Null[uuid.UUID]
+ SecretMetadata sql.Null[string]
+ InternalMetadata sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_folder_versions.go b/backend-go/internal/database/pg/gen/model/secret_folder_versions.go
index 4f058af890..5d9dcb7d85 100644
--- a/backend-go/internal/database/pg/gen/model/secret_folder_versions.go
+++ b/backend-go/internal/database/pg/gen/model/secret_folder_versions.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,10 +16,10 @@ import (
type SecretFolderVersions struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Version *int32
+ Version sql.Null[int32]
CreatedAt time.Time
UpdatedAt time.Time
EnvId uuid.UUID
FolderId uuid.UUID
- Description *string
+ Description sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_folders.go b/backend-go/internal/database/pg/gen/model/secret_folders.go
index f4764b44a2..5fb3fe9911 100644
--- a/backend-go/internal/database/pg/gen/model/secret_folders.go
+++ b/backend-go/internal/database/pg/gen/model/secret_folders.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,12 +16,12 @@ import (
type SecretFolders struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Version *int32
+ Version sql.Null[int32]
CreatedAt time.Time
UpdatedAt time.Time
EnvId uuid.UUID
- ParentId *uuid.UUID
- IsReserved *bool
- Description *string
- LastSecretModified *time.Time
+ ParentId sql.Null[uuid.UUID]
+ IsReserved sql.Null[bool]
+ Description sql.Null[string]
+ LastSecretModified sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_imports.go b/backend-go/internal/database/pg/gen/model/secret_imports.go
index deb63f7b9b..f9858cc112 100644
--- a/backend-go/internal/database/pg/gen/model/secret_imports.go
+++ b/backend-go/internal/database/pg/gen/model/secret_imports.go
@@ -8,22 +8,23 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretImports struct {
ID uuid.UUID `sql:"primary_key"`
- Version *int32
+ Version sql.Null[int32]
ImportPath string
ImportEnv uuid.UUID
Position int32
CreatedAt time.Time
UpdatedAt time.Time
FolderId uuid.UUID
- IsReplication *bool
- IsReplicationSuccess *bool
- ReplicationStatus *string
- LastReplicated *time.Time
- IsReserved *bool
+ IsReplication sql.Null[bool]
+ IsReplicationSuccess sql.Null[bool]
+ ReplicationStatus sql.Null[string]
+ LastReplicated sql.NullTime
+ IsReserved sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_rotations.go b/backend-go/internal/database/pg/gen/model/secret_rotations.go
index a11546a835..195b56e9c2 100644
--- a/backend-go/internal/database/pg/gen/model/secret_rotations.go
+++ b/backend-go/internal/database/pg/gen/model/secret_rotations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,14 +18,14 @@ type SecretRotations struct {
Provider string
SecretPath string
Interval int32
- LastRotatedAt *time.Time
- Status *string
- StatusMessage *string
- EncryptedData *string
- EncryptedDataIV *string
- EncryptedDataTag *string
- Algorithm *string
- KeyEncoding *string
+ LastRotatedAt sql.NullTime
+ Status sql.Null[string]
+ StatusMessage sql.Null[string]
+ EncryptedData sql.Null[string]
+ EncryptedDataIV sql.Null[string]
+ EncryptedDataTag sql.Null[string]
+ Algorithm sql.Null[string]
+ KeyEncoding sql.Null[string]
EnvId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/secret_rotations_v2.go b/backend-go/internal/database/pg/gen/model/secret_rotations_v2.go
index c9410bf997..09d74baf31 100644
--- a/backend-go/internal/database/pg/gen/model/secret_rotations_v2.go
+++ b/backend-go/internal/database/pg/gen/model/secret_rotations_v2.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type SecretRotationsV2 struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
Type string
Parameters string
SecretsMapping string
@@ -31,8 +32,8 @@ type SecretRotationsV2 struct {
RotationStatus string
LastRotationAttemptedAt time.Time
LastRotatedAt time.Time
- EncryptedLastRotationMessage *[]byte
- LastRotationJobId *string
- NextRotationAt *time.Time
+ EncryptedLastRotationMessage sql.Null[[]byte]
+ LastRotationJobId sql.Null[string]
+ NextRotationAt sql.NullTime
IsLastRotationManual bool
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_scanning_configs.go b/backend-go/internal/database/pg/gen/model/secret_scanning_configs.go
index 53aba67444..e29f3f4623 100644
--- a/backend-go/internal/database/pg/gen/model/secret_scanning_configs.go
+++ b/backend-go/internal/database/pg/gen/model/secret_scanning_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,7 +16,7 @@ import (
type SecretScanningConfigs struct {
ID uuid.UUID `sql:"primary_key"`
ProjectId string
- Content *string
+ Content sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_scanning_data_sources.go b/backend-go/internal/database/pg/gen/model/secret_scanning_data_sources.go
index 53c8bf7529..b4402fc513 100644
--- a/backend-go/internal/database/pg/gen/model/secret_scanning_data_sources.go
+++ b/backend-go/internal/database/pg/gen/model/secret_scanning_data_sources.go
@@ -8,20 +8,21 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretScanningDataSources struct {
ID uuid.UUID `sql:"primary_key"`
- ExternalId *string
+ ExternalId sql.Null[string]
Name string
- Description *string
+ Description sql.Null[string]
Type string
Config string
- EncryptedCredentials *[]byte
- ConnectionId *uuid.UUID
- IsAutoScanEnabled *bool
+ EncryptedCredentials sql.Null[[]byte]
+ ConnectionId sql.Null[uuid.UUID]
+ IsAutoScanEnabled sql.Null[bool]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/secret_scanning_findings.go b/backend-go/internal/database/pg/gen/model/secret_scanning_findings.go
index dbf2a831b6..d6a0e17b35 100644
--- a/backend-go/internal/database/pg/gen/model/secret_scanning_findings.go
+++ b/backend-go/internal/database/pg/gen/model/secret_scanning_findings.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -21,11 +22,11 @@ type SecretScanningFindings struct {
Rule string
Severity string
Status string
- Remarks *string
+ Remarks sql.Null[string]
Fingerprint string
Details string
ProjectId string
- ScanId *uuid.UUID
+ ScanId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_scanning_git_risks.go b/backend-go/internal/database/pg/gen/model/secret_scanning_git_risks.go
index 8614b1c7f6..7ce6cef979 100644
--- a/backend-go/internal/database/pg/gen/model/secret_scanning_git_risks.go
+++ b/backend-go/internal/database/pg/gen/model/secret_scanning_git_risks.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -15,33 +16,33 @@ import (
type SecretScanningGitRisks struct {
ID uuid.UUID `sql:"primary_key"`
- Description *string
- StartLine *string
- EndLine *string
- StartColumn *string
- EndColumn *string
- File *string
- SymlinkFile *string
- Commit *string
- Entropy *string
- Author *string
- Email *string
- Date *string
- Message *string
+ Description sql.Null[string]
+ StartLine sql.Null[string]
+ EndLine sql.Null[string]
+ StartColumn sql.Null[string]
+ EndColumn sql.Null[string]
+ File sql.Null[string]
+ SymlinkFile sql.Null[string]
+ Commit sql.Null[string]
+ Entropy sql.Null[string]
+ Author sql.Null[string]
+ Email sql.Null[string]
+ Date sql.Null[string]
+ Message sql.Null[string]
Tags *pq.StringArray
- RuleID *string
- Fingerprint *string
- FingerPrintWithoutCommitId *string
- IsFalsePositive *bool
- IsResolved *bool
- RiskOwner *string
+ RuleID sql.Null[string]
+ Fingerprint sql.Null[string]
+ FingerPrintWithoutCommitId sql.Null[string]
+ IsFalsePositive sql.Null[bool]
+ IsResolved sql.Null[bool]
+ RiskOwner sql.Null[string]
InstallationId string
- RepositoryId *string
- RepositoryLink *string
- RepositoryFullName *string
- PusherName *string
- PusherEmail *string
- Status *string
+ RepositoryId sql.Null[string]
+ RepositoryLink sql.Null[string]
+ RepositoryFullName sql.Null[string]
+ PusherName sql.Null[string]
+ PusherEmail sql.Null[string]
+ Status sql.Null[string]
OrgId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/secret_scanning_scans.go b/backend-go/internal/database/pg/gen/model/secret_scanning_scans.go
index d00c5a1575..a060b6dee3 100644
--- a/backend-go/internal/database/pg/gen/model/secret_scanning_scans.go
+++ b/backend-go/internal/database/pg/gen/model/secret_scanning_scans.go
@@ -8,15 +8,15 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
- "time"
)
type SecretScanningScans struct {
ID uuid.UUID `sql:"primary_key"`
Status string
- StatusMessage *string
+ StatusMessage sql.Null[string]
Type string
ResourceId uuid.UUID
- CreatedAt *time.Time
+ CreatedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_sharing.go b/backend-go/internal/database/pg/gen/model/secret_sharing.go
index 6ef3cb2a02..7a57c26f39 100644
--- a/backend-go/internal/database/pg/gen/model/secret_sharing.go
+++ b/backend-go/internal/database/pg/gen/model/secret_sharing.go
@@ -8,29 +8,30 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
type SecretSharing struct {
ID uuid.UUID `sql:"primary_key"`
- EncryptedValue *string
- Iv *string
- Tag *string
- HashedHex *string
+ EncryptedValue sql.Null[string]
+ Iv sql.Null[string]
+ Tag sql.Null[string]
+ HashedHex sql.Null[string]
ExpiresAt time.Time
- UserId *uuid.UUID
- OrgId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ OrgId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
- ExpiresAfterViews *int32
+ ExpiresAfterViews sql.Null[int32]
AccessType string
- Name *string
- LastViewedAt *time.Time
- Password *string
- EncryptedSecret *[]byte
- Identifier *string
+ Name sql.Null[string]
+ LastViewedAt sql.NullTime
+ Password sql.Null[string]
+ EncryptedSecret sql.Null[[]byte]
+ Identifier sql.Null[string]
Type string
- AuthorizedEmails *string
- IdentityId *uuid.UUID
+ AuthorizedEmails sql.Null[string]
+ IdentityId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_snapshots.go b/backend-go/internal/database/pg/gen/model/secret_snapshots.go
index 31a7bae358..9442ec976e 100644
--- a/backend-go/internal/database/pg/gen/model/secret_snapshots.go
+++ b/backend-go/internal/database/pg/gen/model/secret_snapshots.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,7 +17,7 @@ type SecretSnapshots struct {
ID uuid.UUID `sql:"primary_key"`
EnvId uuid.UUID
FolderId uuid.UUID
- ParentFolderId *uuid.UUID
+ ParentFolderId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_syncs.go b/backend-go/internal/database/pg/gen/model/secret_syncs.go
index 1acac595ba..19316c04f6 100644
--- a/backend-go/internal/database/pg/gen/model/secret_syncs.go
+++ b/backend-go/internal/database/pg/gen/model/secret_syncs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,27 +16,27 @@ import (
type SecretSyncs struct {
ID uuid.UUID `sql:"primary_key"`
Name string
- Description *string
+ Description sql.Null[string]
Destination string
IsAutoSyncEnabled bool
Version int32
DestinationConfig string
SyncOptions string
ProjectId string
- FolderId *uuid.UUID
+ FolderId sql.Null[uuid.UUID]
ConnectionId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
- SyncStatus *string
- LastSyncJobId *string
- LastSyncMessage *string
- LastSyncedAt *time.Time
- ImportStatus *string
- LastImportJobId *string
- LastImportMessage *string
- LastImportedAt *time.Time
- RemoveStatus *string
- LastRemoveJobId *string
- LastRemoveMessage *string
- LastRemovedAt *time.Time
+ SyncStatus sql.Null[string]
+ LastSyncJobId sql.Null[string]
+ LastSyncMessage sql.Null[string]
+ LastSyncedAt sql.NullTime
+ ImportStatus sql.Null[string]
+ LastImportJobId sql.Null[string]
+ LastImportMessage sql.Null[string]
+ LastImportedAt sql.NullTime
+ RemoveStatus sql.Null[string]
+ LastRemoveJobId sql.Null[string]
+ LastRemoveMessage sql.Null[string]
+ LastRemovedAt sql.NullTime
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_tags.go b/backend-go/internal/database/pg/gen/model/secret_tags.go
index e6e775b42b..97478dd31a 100644
--- a/backend-go/internal/database/pg/gen/model/secret_tags.go
+++ b/backend-go/internal/database/pg/gen/model/secret_tags.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,10 +16,10 @@ import (
type SecretTags struct {
ID uuid.UUID `sql:"primary_key"`
Slug string
- Color *string
+ Color sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
- CreatedBy *uuid.UUID
+ CreatedBy sql.Null[uuid.UUID]
ProjectId string
CreatedByActorType string
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_versions.go b/backend-go/internal/database/pg/gen/model/secret_versions.go
index 6db6286425..af7bbd8883 100644
--- a/backend-go/internal/database/pg/gen/model/secret_versions.go
+++ b/backend-go/internal/database/pg/gen/model/secret_versions.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,26 +17,26 @@ type SecretVersions struct {
ID uuid.UUID `sql:"primary_key"`
Version int32
Type string
- SecretBlindIndex *string
+ SecretBlindIndex sql.Null[string]
SecretKeyCiphertext string
SecretKeyIV string
SecretKeyTag string
SecretValueCiphertext string
SecretValueIV string
SecretValueTag string
- SecretCommentCiphertext *string
- SecretCommentIV *string
- SecretCommentTag *string
- SecretReminderNote *string
- SecretReminderRepeatDays *int32
- SkipMultilineEncoding *bool
+ SecretCommentCiphertext sql.Null[string]
+ SecretCommentIV sql.Null[string]
+ SecretCommentTag sql.Null[string]
+ SecretReminderNote sql.Null[string]
+ SecretReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
Algorithm string
KeyEncoding string
- Metadata *string
- EnvId *uuid.UUID
+ Metadata sql.Null[string]
+ EnvId sql.Null[uuid.UUID]
SecretId uuid.UUID
FolderId uuid.UUID
- UserId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/secret_versions_v2.go b/backend-go/internal/database/pg/gen/model/secret_versions_v2.go
index 03fbead8eb..5005368e41 100644
--- a/backend-go/internal/database/pg/gen/model/secret_versions_v2.go
+++ b/backend-go/internal/database/pg/gen/model/secret_versions_v2.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,23 +18,23 @@ type SecretVersionsV2 struct {
Version int32
Type string
Key string
- EncryptedValue *[]byte
- EncryptedComment *[]byte
- ReminderNote *string
- ReminderRepeatDays *int32
- SkipMultilineEncoding *bool
- Metadata *string
- EnvId *uuid.UUID
+ EncryptedValue sql.Null[[]byte]
+ EncryptedComment sql.Null[[]byte]
+ ReminderNote sql.Null[string]
+ ReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
+ Metadata sql.Null[string]
+ EnvId sql.Null[uuid.UUID]
SecretId uuid.UUID
FolderId uuid.UUID
- UserId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
- UserActorId *uuid.UUID
- IdentityActorId *uuid.UUID
- ActorType *string
- ParentVersionId *uuid.UUID
+ UserActorId sql.Null[uuid.UUID]
+ IdentityActorId sql.Null[uuid.UUID]
+ ActorType sql.Null[string]
+ ParentVersionId sql.Null[uuid.UUID]
IsRedacted bool
- RedactedAt *time.Time
- RedactedByUserId *uuid.UUID
+ RedactedAt sql.NullTime
+ RedactedByUserId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/secrets.go b/backend-go/internal/database/pg/gen/model/secrets.go
index 270486d261..0b70b5b02c 100644
--- a/backend-go/internal/database/pg/gen/model/secrets.go
+++ b/backend-go/internal/database/pg/gen/model/secrets.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,23 +17,23 @@ type Secrets struct {
ID uuid.UUID `sql:"primary_key"`
Version int32
Type string
- SecretBlindIndex *string
+ SecretBlindIndex sql.Null[string]
SecretKeyCiphertext string
SecretKeyIV string
SecretKeyTag string
SecretValueCiphertext string
SecretValueIV string
SecretValueTag string
- SecretCommentCiphertext *string
- SecretCommentIV *string
- SecretCommentTag *string
- SecretReminderNote *string
- SecretReminderRepeatDays *int32
- SkipMultilineEncoding *bool
+ SecretCommentCiphertext sql.Null[string]
+ SecretCommentIV sql.Null[string]
+ SecretCommentTag sql.Null[string]
+ SecretReminderNote sql.Null[string]
+ SecretReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
Algorithm string
KeyEncoding string
- Metadata *string
- UserId *uuid.UUID
+ Metadata sql.Null[string]
+ UserId sql.Null[uuid.UUID]
FolderId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/secrets_v2.go b/backend-go/internal/database/pg/gen/model/secrets_v2.go
index 5808f90eaf..a0c07d2b12 100644
--- a/backend-go/internal/database/pg/gen/model/secrets_v2.go
+++ b/backend-go/internal/database/pg/gen/model/secrets_v2.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,13 +18,13 @@ type SecretsV2 struct {
Version int32
Type string
Key string
- EncryptedValue *[]byte
- EncryptedComment *[]byte
- ReminderNote *string
- ReminderRepeatDays *int32
- SkipMultilineEncoding *bool
- Metadata *string
- UserId *uuid.UUID
+ EncryptedValue sql.Null[[]byte]
+ EncryptedComment sql.Null[[]byte]
+ ReminderNote sql.Null[string]
+ ReminderRepeatDays sql.Null[int32]
+ SkipMultilineEncoding sql.Null[bool]
+ Metadata sql.Null[string]
+ UserId sql.Null[uuid.UUID]
FolderId uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/service_tokens.go b/backend-go/internal/database/pg/gen/model/service_tokens.go
index e18781c69d..a404ba2d61 100644
--- a/backend-go/internal/database/pg/gen/model/service_tokens.go
+++ b/backend-go/internal/database/pg/gen/model/service_tokens.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/lib/pq"
"time"
)
@@ -17,15 +18,15 @@ type ServiceTokens struct {
Name string
Scopes string
Permissions pq.StringArray
- LastUsed *time.Time
- ExpiresAt *time.Time
+ LastUsed sql.NullTime
+ ExpiresAt sql.NullTime
SecretHash string
- EncryptedKey *string
- Iv *string
- Tag *string
+ EncryptedKey sql.Null[string]
+ Iv sql.Null[string]
+ Tag sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
CreatedBy string
ProjectId string
- ExpiryNotificationSent *bool
+ ExpiryNotificationSent sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/ssh_certificates.go b/backend-go/internal/database/pg/gen/model/ssh_certificates.go
index d6897d2a98..ad7a706472 100644
--- a/backend-go/internal/database/pg/gen/model/ssh_certificates.go
+++ b/backend-go/internal/database/pg/gen/model/ssh_certificates.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -17,13 +18,13 @@ type SSHCertificates struct {
ID uuid.UUID `sql:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
- SshCaId *uuid.UUID
- SshCertificateTemplateId *uuid.UUID
+ SshCaId sql.Null[uuid.UUID]
+ SshCertificateTemplateId sql.Null[uuid.UUID]
SerialNumber string
CertType string
Principals pq.StringArray
KeyId string
NotBefore time.Time
NotAfter time.Time
- SshHostId *uuid.UUID
+ SshHostId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/ssh_host_login_user_mappings.go b/backend-go/internal/database/pg/gen/model/ssh_host_login_user_mappings.go
index 8346a825c3..2543ab4bc8 100644
--- a/backend-go/internal/database/pg/gen/model/ssh_host_login_user_mappings.go
+++ b/backend-go/internal/database/pg/gen/model/ssh_host_login_user_mappings.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,6 +18,6 @@ type SSHHostLoginUserMappings struct {
CreatedAt time.Time
UpdatedAt time.Time
SshHostLoginUserId uuid.UUID
- UserId *uuid.UUID
- GroupId *uuid.UUID
+ UserId sql.Null[uuid.UUID]
+ GroupId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/ssh_host_login_users.go b/backend-go/internal/database/pg/gen/model/ssh_host_login_users.go
index 63b68cfd52..2b624ed4a4 100644
--- a/backend-go/internal/database/pg/gen/model/ssh_host_login_users.go
+++ b/backend-go/internal/database/pg/gen/model/ssh_host_login_users.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,7 +17,7 @@ type SSHHostLoginUsers struct {
ID uuid.UUID `sql:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
- SshHostId *uuid.UUID
+ SshHostId sql.Null[uuid.UUID]
LoginUser string
- SshHostGroupId *uuid.UUID
+ SshHostGroupId sql.Null[uuid.UUID]
}
diff --git a/backend-go/internal/database/pg/gen/model/ssh_hosts.go b/backend-go/internal/database/pg/gen/model/ssh_hosts.go
index 3fa51b3561..b41d985663 100644
--- a/backend-go/internal/database/pg/gen/model/ssh_hosts.go
+++ b/backend-go/internal/database/pg/gen/model/ssh_hosts.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -22,5 +23,5 @@ type SSHHosts struct {
HostCertTtl string
UserSshCaId uuid.UUID
HostSshCaId uuid.UUID
- Alias *string
+ Alias sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/super_admin.go b/backend-go/internal/database/pg/gen/model/super_admin.go
index e1745fad1d..6cdd87ce3d 100644
--- a/backend-go/internal/database/pg/gen/model/super_admin.go
+++ b/backend-go/internal/database/pg/gen/model/super_admin.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -15,30 +16,30 @@ import (
type SuperAdmin struct {
ID uuid.UUID `sql:"primary_key"`
- Initialized *bool
- AllowSignUp *bool
+ Initialized sql.Null[bool]
+ AllowSignUp sql.Null[bool]
CreatedAt time.Time
UpdatedAt time.Time
- AllowedSignUpDomain *string
+ AllowedSignUpDomain sql.Null[string]
InstanceId uuid.UUID
- TrustSamlEmails *bool
- TrustLdapEmails *bool
- TrustOidcEmails *bool
- DefaultAuthOrgId *uuid.UUID
+ TrustSamlEmails sql.Null[bool]
+ TrustLdapEmails sql.Null[bool]
+ TrustOidcEmails sql.Null[bool]
+ DefaultAuthOrgId sql.Null[uuid.UUID]
EnabledLoginMethods *pq.StringArray
- EncryptedSlackClientId *[]byte
- EncryptedSlackClientSecret *[]byte
- AuthConsentContent *string
- PageFrameContent *string
+ EncryptedSlackClientId sql.Null[[]byte]
+ EncryptedSlackClientSecret sql.Null[[]byte]
+ AuthConsentContent sql.Null[string]
+ PageFrameContent sql.Null[string]
AdminIdentityIds *pq.StringArray
- EncryptedMicrosoftTeamsAppId *[]byte
- EncryptedMicrosoftTeamsClientSecret *[]byte
- EncryptedMicrosoftTeamsBotId *[]byte
- EncryptedGitHubAppConnectionClientId *[]byte
- EncryptedGitHubAppConnectionClientSecret *[]byte
- EncryptedGitHubAppConnectionSlug *[]byte
- EncryptedGitHubAppConnectionId *[]byte
- EncryptedGitHubAppConnectionPrivateKey *[]byte
- EncryptedEnvOverrides *[]byte
+ EncryptedMicrosoftTeamsAppId sql.Null[[]byte]
+ EncryptedMicrosoftTeamsClientSecret sql.Null[[]byte]
+ EncryptedMicrosoftTeamsBotId sql.Null[[]byte]
+ EncryptedGitHubAppConnectionClientId sql.Null[[]byte]
+ EncryptedGitHubAppConnectionClientSecret sql.Null[[]byte]
+ EncryptedGitHubAppConnectionSlug sql.Null[[]byte]
+ EncryptedGitHubAppConnectionId sql.Null[[]byte]
+ EncryptedGitHubAppConnectionPrivateKey sql.Null[[]byte]
+ EncryptedEnvOverrides sql.Null[[]byte]
FipsEnabled bool
}
diff --git a/backend-go/internal/database/pg/gen/model/trusted_ips.go b/backend-go/internal/database/pg/gen/model/trusted_ips.go
index da5ac88b9f..af0cb2c540 100644
--- a/backend-go/internal/database/pg/gen/model/trusted_ips.go
+++ b/backend-go/internal/database/pg/gen/model/trusted_ips.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,9 +17,9 @@ type TrustedIps struct {
ID uuid.UUID `sql:"primary_key"`
IpAddress string
Type string
- Prefix *int32
- IsActive *bool
- Comment *string
+ Prefix sql.Null[int32]
+ IsActive sql.Null[bool]
+ Comment sql.Null[string]
ProjectId string
CreatedAt time.Time
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/user_aliases.go b/backend-go/internal/database/pg/gen/model/user_aliases.go
index 4abfc3957e..269dce92cb 100644
--- a/backend-go/internal/database/pg/gen/model/user_aliases.go
+++ b/backend-go/internal/database/pg/gen/model/user_aliases.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -16,12 +17,12 @@ import (
type UserAliases struct {
ID uuid.UUID `sql:"primary_key"`
UserId uuid.UUID
- Username *string
+ Username sql.Null[string]
AliasType string
ExternalId string
Emails *pq.StringArray
- OrgId *uuid.UUID
+ OrgId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
- IsEmailVerified *bool
+ IsEmailVerified sql.Null[bool]
}
diff --git a/backend-go/internal/database/pg/gen/model/user_encryption_keys.go b/backend-go/internal/database/pg/gen/model/user_encryption_keys.go
index b9c0855aa3..415fcf6d9c 100644
--- a/backend-go/internal/database/pg/gen/model/user_encryption_keys.go
+++ b/backend-go/internal/database/pg/gen/model/user_encryption_keys.go
@@ -8,27 +8,28 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
)
type UserEncryptionKeys struct {
ID uuid.UUID `sql:"primary_key"`
- ClientPublicKey *string
- ServerPrivateKey *string
- EncryptionVersion *int32
- ProtectedKey *string
- ProtectedKeyIV *string
- ProtectedKeyTag *string
- PublicKey *string
- EncryptedPrivateKey *string
- Iv *string
- Tag *string
- Salt *string
- Verifier *string
+ ClientPublicKey sql.Null[string]
+ ServerPrivateKey sql.Null[string]
+ EncryptionVersion sql.Null[int32]
+ ProtectedKey sql.Null[string]
+ ProtectedKeyIV sql.Null[string]
+ ProtectedKeyTag sql.Null[string]
+ PublicKey sql.Null[string]
+ EncryptedPrivateKey sql.Null[string]
+ Iv sql.Null[string]
+ Tag sql.Null[string]
+ Salt sql.Null[string]
+ Verifier sql.Null[string]
UserId uuid.UUID
- HashedPassword *string
- ServerEncryptedPrivateKey *string
- ServerEncryptedPrivateKeyIV *string
- ServerEncryptedPrivateKeyTag *string
- ServerEncryptedPrivateKeyEncoding *string
+ HashedPassword sql.Null[string]
+ ServerEncryptedPrivateKey sql.Null[string]
+ ServerEncryptedPrivateKeyIV sql.Null[string]
+ ServerEncryptedPrivateKeyTag sql.Null[string]
+ ServerEncryptedPrivateKeyEncoding sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/user_notifications.go b/backend-go/internal/database/pg/gen/model/user_notifications.go
index f6b8fa1900..94d0f9a2ce 100644
--- a/backend-go/internal/database/pg/gen/model/user_notifications.go
+++ b/backend-go/internal/database/pg/gen/model/user_notifications.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,11 +16,11 @@ import (
type UserNotifications struct {
ID uuid.UUID `sql:"primary_key"`
UserId uuid.UUID
- OrgId *uuid.UUID
+ OrgId sql.Null[uuid.UUID]
Type string
Title string
- Body *string
- Link *string
+ Body sql.Null[string]
+ Link sql.Null[string]
IsRead bool
CreatedAt time.Time `sql:"primary_key"`
UpdatedAt time.Time
diff --git a/backend-go/internal/database/pg/gen/model/users.go b/backend-go/internal/database/pg/gen/model/users.go
index e006ebf91d..854f300750 100644
--- a/backend-go/internal/database/pg/gen/model/users.go
+++ b/backend-go/internal/database/pg/gen/model/users.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -15,23 +16,23 @@ import (
type Users struct {
ID uuid.UUID `sql:"primary_key"`
- Email *string
+ Email sql.Null[string]
AuthMethods *pq.StringArray
- SuperAdmin *bool
- FirstName *string
- LastName *string
- IsAccepted *bool
- IsMfaEnabled *bool
+ SuperAdmin sql.Null[bool]
+ FirstName sql.Null[string]
+ LastName sql.Null[string]
+ IsAccepted sql.Null[bool]
+ IsMfaEnabled sql.Null[bool]
MfaMethods *pq.StringArray
- Devices *string
+ Devices sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
IsGhost bool
Username string
- IsEmailVerified *bool
- ConsecutiveFailedMfaAttempts *int32
- IsLocked *bool
- TemporaryLockDateEnd *time.Time
- ConsecutiveFailedPasswordAttempts *int32
- SelectedMfaMethod *string
+ IsEmailVerified sql.Null[bool]
+ ConsecutiveFailedMfaAttempts sql.Null[int32]
+ IsLocked sql.Null[bool]
+ TemporaryLockDateEnd sql.NullTime
+ ConsecutiveFailedPasswordAttempts sql.Null[int32]
+ SelectedMfaMethod sql.Null[string]
}
diff --git a/backend-go/internal/database/pg/gen/model/vault_external_migration_configs.go b/backend-go/internal/database/pg/gen/model/vault_external_migration_configs.go
index 4edf1396d3..73895e5d80 100644
--- a/backend-go/internal/database/pg/gen/model/vault_external_migration_configs.go
+++ b/backend-go/internal/database/pg/gen/model/vault_external_migration_configs.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -16,7 +17,7 @@ type VaultExternalMigrationConfigs struct {
ID uuid.UUID `sql:"primary_key"`
OrgId uuid.UUID
Namespace string
- ConnectionId *uuid.UUID
+ ConnectionId sql.Null[uuid.UUID]
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/webauthn_credentials.go b/backend-go/internal/database/pg/gen/model/webauthn_credentials.go
index ce8b1baba3..b3c19f444e 100644
--- a/backend-go/internal/database/pg/gen/model/webauthn_credentials.go
+++ b/backend-go/internal/database/pg/gen/model/webauthn_credentials.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"github.com/lib/pq"
"time"
@@ -20,8 +21,8 @@ type WebauthnCredentials struct {
PublicKey string
Counter int64
Transports *pq.StringArray
- Name *string
- LastUsedAt *time.Time
+ Name sql.Null[string]
+ LastUsedAt sql.NullTime
CreatedAt time.Time
UpdatedAt time.Time
}
diff --git a/backend-go/internal/database/pg/gen/model/webhooks.go b/backend-go/internal/database/pg/gen/model/webhooks.go
index 48defd11ef..da9611b00b 100644
--- a/backend-go/internal/database/pg/gen/model/webhooks.go
+++ b/backend-go/internal/database/pg/gen/model/webhooks.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -15,22 +16,22 @@ import (
type Webhooks struct {
ID uuid.UUID `sql:"primary_key"`
SecretPath string
- URL *string
- LastStatus *string
- LastRunErrorMessage *string
+ URL sql.Null[string]
+ LastStatus sql.Null[string]
+ LastRunErrorMessage sql.Null[string]
IsDisabled bool
- EncryptedSecretKey *string
- Iv *string
- Tag *string
- Algorithm *string
- KeyEncoding *string
+ EncryptedSecretKey sql.Null[string]
+ Iv sql.Null[string]
+ Tag sql.Null[string]
+ Algorithm sql.Null[string]
+ KeyEncoding sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
EnvId uuid.UUID
- UrlCipherText *string
- UrlIV *string
- UrlTag *string
- Type *string
- EncryptedPassKey *[]byte
+ UrlCipherText sql.Null[string]
+ UrlIV sql.Null[string]
+ UrlTag sql.Null[string]
+ Type sql.Null[string]
+ EncryptedPassKey sql.Null[[]byte]
EncryptedUrl []byte
}
diff --git a/backend-go/internal/database/pg/gen/model/workflow_integrations.go b/backend-go/internal/database/pg/gen/model/workflow_integrations.go
index dfd1f4e7e7..92fff1bf8f 100644
--- a/backend-go/internal/database/pg/gen/model/workflow_integrations.go
+++ b/backend-go/internal/database/pg/gen/model/workflow_integrations.go
@@ -8,6 +8,7 @@
package model
import (
+ "database/sql"
"github.com/google/uuid"
"time"
)
@@ -17,7 +18,7 @@ type WorkflowIntegrations struct {
Integration string
Slug string
OrgId uuid.UUID
- Description *string
+ Description sql.Null[string]
CreatedAt time.Time
UpdatedAt time.Time
Status string