From 692758af10bd000212c7dd502b1c496ba434c52e Mon Sep 17 00:00:00 2001 From: Jun Nishimura Date: Fri, 29 Mar 2024 00:03:41 +0900 Subject: [PATCH] change the size of varchar in CasbinPolicy table (#5) --- policy.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/policy.go b/policy.go index af785cf..d61587d 100644 --- a/policy.go +++ b/policy.go @@ -4,13 +4,13 @@ package casbinbunadapter // https://casbin.org/docs/policy-storage#database-storage-format type CasbinPolicy struct { ID int64 `bun:"id,pk,autoincrement"` - PType string `bun:"ptype,type:varchar(255),notnull"` - V0 string `bun:"v0,type:varchar(255)"` - V1 string `bun:"v1,type:varchar(255)"` - V2 string `bun:"v2,type:varchar(255)"` - V3 string `bun:"v3,type:varchar(255)"` - V4 string `bun:"v4,type:varchar(255)"` - V5 string `bun:"v5,type:varchar(255)"` + PType string `bun:"ptype,type:varchar(100),notnull"` + V0 string `bun:"v0,type:varchar(100)"` + V1 string `bun:"v1,type:varchar(100)"` + V2 string `bun:"v2,type:varchar(100)"` + V3 string `bun:"v3,type:varchar(100)"` + V4 string `bun:"v4,type:varchar(100)"` + V5 string `bun:"v5,type:varchar(100)"` } func (c CasbinPolicy) toSlice() []string {