From 7bbc1541f825b99a5c6bcc3f340b612f5794766f Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Mon, 10 Jan 2022 16:12:43 +0530 Subject: [PATCH] Set Trash colums in models to default to false --- components/usermgmt/pkg/internal/models/accountresourcerole.go | 2 +- components/usermgmt/pkg/internal/models/group.go | 2 +- components/usermgmt/pkg/internal/models/groupaccount.go | 2 +- components/usermgmt/pkg/internal/models/grouprole.go | 2 +- .../usermgmt/pkg/internal/models/projectaccountnamespacerole.go | 2 +- .../usermgmt/pkg/internal/models/projectaccountresourcerole.go | 2 +- .../usermgmt/pkg/internal/models/projectgroupnamespacerole.go | 2 +- components/usermgmt/pkg/internal/models/projectgrouprole.go | 2 +- components/usermgmt/pkg/internal/models/role.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/usermgmt/pkg/internal/models/accountresourcerole.go b/components/usermgmt/pkg/internal/models/accountresourcerole.go index a132816..cda4a5e 100644 --- a/components/usermgmt/pkg/internal/models/accountresourcerole.go +++ b/components/usermgmt/pkg/internal/models/accountresourcerole.go @@ -15,7 +15,7 @@ type AccountResourcerole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/group.go b/components/usermgmt/pkg/internal/models/group.go index 51d7e36..2733be1 100644 --- a/components/usermgmt/pkg/internal/models/group.go +++ b/components/usermgmt/pkg/internal/models/group.go @@ -15,7 +15,7 @@ type Group struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` Type string `bun:"type,notnull"` diff --git a/components/usermgmt/pkg/internal/models/groupaccount.go b/components/usermgmt/pkg/internal/models/groupaccount.go index c8c5907..89b96ae 100644 --- a/components/usermgmt/pkg/internal/models/groupaccount.go +++ b/components/usermgmt/pkg/internal/models/groupaccount.go @@ -15,7 +15,7 @@ type GroupAccount struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` // OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` // PartnerId uuid.UUID `bun:"partner_id,type:uuid"` AccountId uuid.UUID `bun:"account_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/grouprole.go b/components/usermgmt/pkg/internal/models/grouprole.go index e8fa0a2..6530a9b 100644 --- a/components/usermgmt/pkg/internal/models/grouprole.go +++ b/components/usermgmt/pkg/internal/models/grouprole.go @@ -15,7 +15,7 @@ type GroupRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go index 2ab610d..08bf67f 100644 --- a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go +++ b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go @@ -15,7 +15,7 @@ type ProjectAccountNamespaceRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` RoleId uuid.UUID `bun:"role_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go index 451a916..28a88b9 100644 --- a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go +++ b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go @@ -15,7 +15,7 @@ type ProjectAccountResourcerole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go index 3a173cd..810161f 100644 --- a/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go +++ b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go @@ -15,7 +15,7 @@ type ProjectGroupNamespaceRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` RoleId uuid.UUID `bun:"role_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/projectgrouprole.go b/components/usermgmt/pkg/internal/models/projectgrouprole.go index 14d03de..a9dfef5 100644 --- a/components/usermgmt/pkg/internal/models/projectgrouprole.go +++ b/components/usermgmt/pkg/internal/models/projectgrouprole.go @@ -15,7 +15,7 @@ type ProjectGroupRole struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` Default bool `bun:"default,notnull"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` diff --git a/components/usermgmt/pkg/internal/models/role.go b/components/usermgmt/pkg/internal/models/role.go index a5ca75e..9ef1163 100644 --- a/components/usermgmt/pkg/internal/models/role.go +++ b/components/usermgmt/pkg/internal/models/role.go @@ -15,7 +15,7 @@ type Role struct { Description string `bun:"description,notnull"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` - Trash bool `bun:"trash,notnull"` + Trash bool `bun:"trash,notnull,default:false"` OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` PartnerId uuid.UUID `bun:"partner_id,type:uuid"` IsGlobal bool `bun:"is_global,notnull"`