Skip to content

Commit

Permalink
Revert "add gorm type for JSONB fields (#7975)"
Browse files Browse the repository at this point in the history
This reverts commit 47d1eeb.
  • Loading branch information
mayberryzane committed Mar 11, 2024
1 parent 7dba577 commit fba183a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 5 additions & 4 deletions backend/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ var Models = []interface{}{
&IntegrationWorkspaceMapping{},
&EmailOptOut{},
&BillingEmailHistory{},
&Retryable{},
&Service{},
&SetupEvent{},
&SessionAdminsView{},
Expand Down Expand Up @@ -712,7 +713,7 @@ type Session struct {
Environment string `json:"environment"`
AppVersion *string `json:"app_version"`
ServiceName string
UserObject JSONB `json:"user_object" sql:"type:jsonb" gorm:"type:jsonb"`
UserObject JSONB `json:"user_object" sql:"type:jsonb"`
UserProperties string `json:"user_properties"`
// Whether this is the first session created by this user.
FirstTime *bool `json:"first_time" gorm:"default:false"`
Expand All @@ -732,7 +733,7 @@ type Session struct {
// The version of Highlight's Firstload.
FirstloadVersion string `json:"firstload_version"`
// The client configuration that the end-user sets up. This is used for debugging purposes.
ClientConfig *string `json:"client_config" sql:"type:jsonb" gorm:"type:jsonb"`
ClientConfig *string `json:"client_config" sql:"type:jsonb"`
// Determines whether this session should be viewable. This enforces billing.
WithinBillingQuota *bool `json:"within_billing_quota" gorm:"default:true"`
// Used for shareable links. No authentication is needed if IsPublic is true
Expand Down Expand Up @@ -1265,7 +1266,7 @@ type TimelineIndicatorEvent struct {
Timestamp float64
Type int
SID float64
Data JSONB `json:"data" sql:"type:jsonb" gorm:"type:jsonb"`
Data JSONB `json:"data" sql:"type:jsonb"`
}

type RageClickEvent struct {
Expand Down Expand Up @@ -1403,7 +1404,7 @@ type Retryable struct {
Type RetryableType
PayloadType string
PayloadID string
Payload JSONB `sql:"type:jsonb" gorm:"type:jsonb"`
Payload JSONB `sql:"type:jsonb"`
Error string
}

Expand Down
1 change: 0 additions & 1 deletion backend/public-graph/graph/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ func TestInitializeSessionImpl(t *testing.T) {
session, err := resolver.InitializeSessionImpl(ctx, &kafka_queue.InitializeSessionArgs{
ProjectVerboseID: project.VerboseID(),
ServiceName: "my-frontend-app",
ClientConfig: "{}",
})
assert.NoError(t, err)
assert.NotNil(t, session.ID)
Expand Down

0 comments on commit fba183a

Please sign in to comment.