Skip to content

Commit e6c4fdf

Browse files
committed
fix(server): text type for sql server 2019
Resolves #266
1 parent e760a55 commit e6c4fdf

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

server/db/models/email_templates.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ type EmailTemplate struct {
1212
Key string `json:"_key,omitempty" bson:"_key,omitempty" cql:"_key,omitempty"` // for arangodb
1313
ID string `gorm:"primaryKey;type:char(36)" json:"_id" bson:"_id" cql:"id"`
1414
EventName string `gorm:"unique" json:"event_name" bson:"event_name" cql:"event_name"`
15-
Subject string `gorm:"type:text" json:"subject" bson:"subject" cql:"subject"`
16-
Template string `gorm:"type:text" json:"template" bson:"template" cql:"template"`
17-
Design string `gorm:"type:text" json:"design" bson:"design" cql:"design"`
15+
Subject string `json:"subject" bson:"subject" cql:"subject"`
16+
Template string `json:"template" bson:"template" cql:"template"`
17+
Design string `json:"design" bson:"design" cql:"design"`
1818
CreatedAt int64 `json:"created_at" bson:"created_at" cql:"created_at"`
1919
UpdatedAt int64 `json:"updated_at" bson:"updated_at" cql:"updated_at"`
2020
}

server/db/models/env.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package models
66
type Env struct {
77
Key string `json:"_key,omitempty" bson:"_key,omitempty" cql:"_key,omitempty"` // for arangodb
88
ID string `gorm:"primaryKey;type:char(36)" json:"_id" bson:"_id" cql:"id"`
9-
EnvData string `gorm:"type:text" json:"env" bson:"env" cql:"env"`
10-
Hash string `gorm:"type:text" json:"hash" bson:"hash" cql:"hash"`
9+
EnvData string `json:"env" bson:"env" cql:"env"`
10+
Hash string `json:"hash" bson:"hash" cql:"hash"`
1111
UpdatedAt int64 `json:"updated_at" bson:"updated_at" cql:"updated_at"`
1212
CreatedAt int64 `json:"created_at" bson:"created_at" cql:"created_at"`
1313
}

server/db/models/user.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type User struct {
1717

1818
Email string `gorm:"unique" json:"email" bson:"email" cql:"email"`
1919
EmailVerifiedAt *int64 `json:"email_verified_at" bson:"email_verified_at" cql:"email_verified_at"`
20-
Password *string `gorm:"type:text" json:"password" bson:"password" cql:"password"`
20+
Password *string `json:"password" bson:"password" cql:"password"`
2121
SignupMethods string `json:"signup_methods" bson:"signup_methods" cql:"signup_methods"`
2222
GivenName *string `json:"given_name" bson:"given_name" cql:"given_name"`
2323
FamilyName *string `json:"family_name" bson:"family_name" cql:"family_name"`
@@ -27,7 +27,7 @@ type User struct {
2727
Birthdate *string `json:"birthdate" bson:"birthdate" cql:"birthdate"`
2828
PhoneNumber *string `gorm:"unique" json:"phone_number" bson:"phone_number" cql:"phone_number"`
2929
PhoneNumberVerifiedAt *int64 `json:"phone_number_verified_at" bson:"phone_number_verified_at" cql:"phone_number_verified_at"`
30-
Picture *string `gorm:"type:text" json:"picture" bson:"picture" cql:"picture"`
30+
Picture *string `json:"picture" bson:"picture" cql:"picture"`
3131
Roles string `json:"roles" bson:"roles" cql:"roles"`
3232
RevokedTimestamp *int64 `json:"revoked_timestamp" bson:"revoked_timestamp" cql:"revoked_timestamp"`
3333
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled" bson:"is_multi_factor_auth_enabled" cql:"is_multi_factor_auth_enabled"`

server/db/models/verification_requests.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313
type VerificationRequest struct {
1414
Key string `json:"_key,omitempty" bson:"_key" cql:"_key,omitempty"` // for arangodb
1515
ID string `gorm:"primaryKey;type:char(36)" json:"_id" bson:"_id" cql:"id"`
16-
Token string `gorm:"type:text" json:"token" bson:"token" cql:"jwt_token"` // token is reserved keyword in cassandra
16+
Token string `json:"token" bson:"token" cql:"jwt_token"` // token is reserved keyword in cassandra
1717
Identifier string `gorm:"uniqueIndex:idx_email_identifier;type:varchar(64)" json:"identifier" bson:"identifier" cql:"identifier"`
1818
ExpiresAt int64 `json:"expires_at" bson:"expires_at" cql:"expires_at"`
1919
Email string `gorm:"uniqueIndex:idx_email_identifier;type:varchar(256)" json:"email" bson:"email" cql:"email"`
20-
Nonce string `gorm:"type:text" json:"nonce" bson:"nonce" cql:"nonce"`
21-
RedirectURI string `gorm:"type:text" json:"redirect_uri" bson:"redirect_uri" cql:"redirect_uri"`
20+
Nonce string `json:"nonce" bson:"nonce" cql:"nonce"`
21+
RedirectURI string `json:"redirect_uri" bson:"redirect_uri" cql:"redirect_uri"`
2222
CreatedAt int64 `json:"created_at" bson:"created_at" cql:"created_at"`
2323
UpdatedAt int64 `json:"updated_at" bson:"updated_at" cql:"updated_at"`
2424
}

server/db/models/webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type Webhook struct {
1515
Key string `json:"_key,omitempty" bson:"_key,omitempty" cql:"_key,omitempty"` // for arangodb
1616
ID string `gorm:"primaryKey;type:char(36)" json:"_id" bson:"_id" cql:"id"`
1717
EventName string `gorm:"unique" json:"event_name" bson:"event_name" cql:"event_name"`
18-
EndPoint string `gorm:"type:text" json:"endpoint" bson:"endpoint" cql:"endpoint"`
19-
Headers string `gorm:"type:text" json:"headers" bson:"headers" cql:"headers"`
18+
EndPoint string `json:"endpoint" bson:"endpoint" cql:"endpoint"`
19+
Headers string `json:"headers" bson:"headers" cql:"headers"`
2020
Enabled bool `json:"enabled" bson:"enabled" cql:"enabled"`
2121
CreatedAt int64 `json:"created_at" bson:"created_at" cql:"created_at"`
2222
UpdatedAt int64 `json:"updated_at" bson:"updated_at" cql:"updated_at"`

server/db/models/webhook_log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ type WebhookLog struct {
1414
Key string `json:"_key,omitempty" bson:"_key,omitempty" cql:"_key,omitempty"` // for arangodb
1515
ID string `gorm:"primaryKey;type:char(36)" json:"_id" bson:"_id" cql:"id"`
1616
HttpStatus int64 `json:"http_status" bson:"http_status" cql:"http_status"`
17-
Response string `gorm:"type:text" json:"response" bson:"response" cql:"response"`
18-
Request string `gorm:"type:text" json:"request" bson:"request" cql:"request"`
17+
Response string `json:"response" bson:"response" cql:"response"`
18+
Request string `json:"request" bson:"request" cql:"request"`
1919
WebhookID string `gorm:"type:char(36)" json:"webhook_id" bson:"webhook_id" cql:"webhook_id"`
2020
CreatedAt int64 `json:"created_at" bson:"created_at" cql:"created_at"`
2121
UpdatedAt int64 `json:"updated_at" bson:"updated_at" cql:"updated_at"`

0 commit comments

Comments
 (0)