From 9a107bc4ba8a343298d1cba73fea1204106dacc1 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 8 Jan 2024 10:10:19 +1100 Subject: [PATCH] more testing --- models/setup.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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")