From e3825abe9b8be95d34abcae060205d604c842d3c Mon Sep 17 00:00:00 2001 From: kubakl <33988980+kubakl@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:37:32 +0200 Subject: [PATCH] Small fix --- adapter_suite_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/adapter_suite_test.go b/adapter_suite_test.go index 4c8e230..65d1fb2 100644 --- a/adapter_suite_test.go +++ b/adapter_suite_test.go @@ -65,7 +65,12 @@ func (suite *AdapterTestSuite) prePopulateUsingPoliciesFromFile() { } func (suite *AdapterTestSuite) migrateDB() error { - _, err := suite.db.NewCreateTable().Model((*bunadapter.CasbinRule)(nil)).IfNotExists().Exec(context.Background()) + err := suite.db.QueryRow("CREATE SCHEME casbin").Err() + if err != nil { + return fmt.Errorf("failed to create casbin scheme: %w", err) + } + + _, err = suite.db.NewCreateTable().Model((*bunadapter.CasbinRule)(nil)).IfNotExists().Exec(context.Background()) if err != nil { return fmt.Errorf("failed to create casbin rules table: %w", err) }