openflagr / flagr-archived

[Archived] - Merged and move to https://github.com/openflagr/flagr
https://openflagr.github.io/flagr
Apache License 2.0
33 stars 7 forks source link

Migrate from GORM v1 to v2 #59

Closed fenriskiba closed 2 years ago

fenriskiba commented 2 years ago

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:

fenriskiba commented 2 years ago

@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.