Casbin offers an adapter for GORM that sets up the required table and handles adding, updating, etc. information to the table. Casbin's GORM adapter is only compatible with GORM v2.
Rather than rewrite the adapter's functionality to support Flagr's current version of GORM, we're instead migrating Flagr to use GORM v2, as GORM v1 is depreciated.
How Has This Been Tested?
Manual testing for all three database types (PostgreSQL, SQLite, MySQL) for the following scenarios:
Creating a new Flagr database using GORM v2
Migrating an existing GORM v1 Flagr database to GORM v2
Manual regression testing (using all of the above scenarios)
Local CI Test runs
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
@zhouzhuojie @marceloboeira Is there any kind of ETA on reviewing this PR? Just don't want this to get auto-closed for lack of activity before it gets a review like I saw a few other PRs did.
Developed in collaboration with @vodzak.
Description
Migrated Flagr from GORM v1 to GORM v2.
Motivation and Context
This code change is required to support implementing Casbin in Flagr.
Casbin offers an adapter for GORM that sets up the required table and handles adding, updating, etc. information to the table. Casbin's GORM adapter is only compatible with GORM v2.
Rather than rewrite the adapter's functionality to support Flagr's current version of GORM, we're instead migrating Flagr to use GORM v2, as GORM v1 is depreciated.
How Has This Been Tested?
Types of changes
Checklist: