-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: license management feature flag #458
feat: license management feature flag #458
Conversation
Signed-off-by: christophenne <[email protected]>
Signed-off-by: christophenne <[email protected]>
Signed-off-by: christophenne <[email protected]>
Signed-off-by: christophenne <[email protected]>
Signed-off-by: christophenne <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather prefer to not use a boolean but store features with an ENUM in a list / separate table.
I think I found the problem, and it appears to be a bug in pgx!! I think if you replace LoadTypes(...) and RegisterTypes(...) in the svc package with a loop around LoadType(...) and RegisterType(...) it should work! |
Debugging the createDBPool function … it appears that the pgTypes returned by conn.LoadTypes is just an empty slice lol |
I created the following related issue in the pgx repo: jackc/pgx#2254 For now it's probably easiest to just load each type individually. |
…ype handling Signed-off-by: christophenne <[email protected]>
Signed-off-by: christophenne <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just one small question
Signed-off-by: christophenne <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, but let's merge #455 fist because of the migration IDs
Unfortunately I couldn't make an enum array work with pgx, so I opted for the boolean for now. We can still revisit/refactor/migrate on the second, or latest, third occurrence of a feature flag.
As a positive side effect, I think the manual updating of a db entry will be more straight forward for now 🤷♂️