diff --git a/models/setup.go b/models/setup.go index 3048fd2..b2ca445 100644 --- a/models/setup.go +++ b/models/setup.go @@ -28,7 +28,6 @@ const createRoles string = ` RoleName VARCHAR, ReadOnly BOOLEAN, Admin BOOLEAN, - LdapGroup VARCHAR DEFAULT '' ); ` @@ -247,6 +246,16 @@ func CreateTables() { } } + // Remove LdapGroup column from roles table + ldapCheck, _ := CheckColumnExists("roles", "LdapGroup") + if ldapCheck { + _, err := db.Exec("ALTER TABLE roles DROP COLUMN LdapGroup;") + if err != nil { + log.Printf("Error altering roles table to renmove LdapGroup column : '%s'\n", err) + os.Exit(1) + } + } + /* // Database updates added after initial version released ldapCheck, _ := CheckColumnExists("roles", "LdapGroup")