uatuko / ruek

🔐 Lightning fast, global scale authorization service without the overhead of a yet another DSL.
Apache License 2.0
95 stars 7 forks source link

Change names of junction tables #19

Closed neculalaura closed 1 year ago

neculalaura commented 1 year ago

This issue changes the names of junction tables by swapping the referred tables and prefixing the names with the policy tables (e.g. identities_rbac-policies becomes rbac-policies_identities)

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (7298c37) 88.18% compared to head (bc656ba) 88.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #19 +/- ## ======================================= Coverage 88.18% 88.18% ======================================= Files 18 18 Lines 508 508 Branches 24 24 ======================================= Hits 448 448 Misses 55 55 Partials 5 5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

neculalaura commented 1 year ago

@uditha-atukorala

  1. Do you say "Identity has policy" or "policy applies to identity"
  2. Do you want columns in the junction tables ordered alphabetically or same order as the table they reference in the table name (e.g. in the rbac-policies_identities table, should identity_id or policy_id come first)?
  3. Same applies for FK constraints?
  4. there is a lint issue in src/events/concepts.h
uatuko commented 1 year ago

@uditha-atukorala

  1. Do you say "Identity has policy" or "policy applies to identity"
  2. Do you want columns in the junction tables ordered alphabetically or same order as the table they reference in the table name (e.g. in the rbac-policies_identities table, should identity_id or policy_id come first)?
  3. Same applies for FK constraints?
  4. there is a lint issue in src/events/concepts.h
  1. I'd say policy applied to identity.
  2. I think it would make more sense for policy_id to come first.
  3. Think FK constraints should follow the column order.
  4. This is when it's a newer version of clang-format it seems to style differently. I've left it what works for CI for the moment.