Skip to content

feat: add actor_location column to the github_org_audit_log table #296

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

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

patrickdevivo
Copy link
Contributor

@patrickdevivo patrickdevivo commented Jun 30, 2022

Adds a new column actor_location to the github_org_audit_log

@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #296 (b08d715) into main (58f2c6d) will decrease coverage by 0.04%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main     #296      +/-   ##
==========================================
- Coverage   71.69%   71.65%   -0.05%     
==========================================
  Files          57       57              
  Lines        3466     3471       +5     
==========================================
+ Hits         2485     2487       +2     
- Misses        620      621       +1     
- Partials      361      363       +2     
Impacted Files Coverage Δ
extensions/internal/github/org_audit_log.go 69.00% <40.00%> (-1.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58f2c6d...b08d715. Read the comment docs.

Copy link
Contributor

@amenowanna amenowanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we are choosing JSON vs JSONB?

@patrickdevivo
Copy link
Contributor Author

Is there a reason we are choosing JSON vs JSONB?

So SQLite doesn't really have a concept of JSONB - in fact, JSON isn't a "real" datatype in SQLite either (https://www.sqlite.org/datatype3.html), the type system is pretty flexible. Here, we just mark the column as JSON to indicate to the user to expect a string that can be treated as JSON.

There are some built-in JSON functions/operators that allow for queries such as:

select json_extract(actor_location, '$.city'), * from github_org_audit_log('mergestat')

@amenowanna
Copy link
Contributor

Is there a reason we are choosing JSON vs JSONB?

So SQLite doesn't really have a concept of JSONB - in fact, JSON isn't a "real" datatype in SQLite either (https://www.sqlite.org/datatype3.html), the type system is pretty flexible. Here, we just mark the column as JSON to indicate to the user to expect a string that can be treated as JSON.

There are some built-in JSON functions/operators that allow for queries such as:

select json_extract(actor_location, '$.city'), * from github_org_audit_log('mergestat')

TIL. Thank you!

@patrickdevivo patrickdevivo merged commit ee2c342 into main Jun 30, 2022
@patrickdevivo patrickdevivo deleted the audit-log-additional-cols branch June 30, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants