Comments (9)
@olirice I am curious how you get same/similar functionality with pgAudit, i understand the flexibility of pgAudit to log based on a role and grants can be very granular.
I think a lot of people (or just me) have come to this project looking to implement table history for their application users. For this use case pgAudit doesn't really work because i can't query the log (can I?). For the use-case of User Edit History would this repo or approach be recommended or is there another option?
from supa_audit.
I think a lot of people (or just me) have come to this project looking to implement table history for their application users
that's fair
because i can't query the log (can I?)
correct, not without querying logs
For the use-case of User Edit History would this repo or approach be recommended or is there another option?
yes, for the situation you described this repo would be a good option!
from supa_audit.
Hey @olirice!
Epic stuff! I've been going over the articles, code and issues for the better part of the morning.
I'm transitioning a live project to Supabase soon (hosted by Supabase) and want to use this for a particular table. I have the project set-up and can't seem to install this on the schema natively (as mentioned above).
Two quick questions on this issue:
- I'm wondering if it will soon be available (as a built-in) at
https://supabase.com/dashboard/project/<reference_id_here>/database/extensions
and if I should wait for that? - I'm hoping to not have to run the SQL manually, so that I get all the future gains as the extension itself does. What would you recommend I do?
Thank you!
from supa_audit.
can't seem to install this on the schema natively
what error are you running into?
Our official recommendation for auditing is to use pgaudit
This repo is fully functional but mostly intended as a companion for the blog post
I'm hoping to not have to run the SQL manually
We don't offer supa_audit
on the hosted platform but so executing the SQL in your editor if via migrations is the only way to get it running.
Since its a SQL only extension you can manually install it by executing this file without the 2 highlighted lines. Any future updates will continue to have a supa-audit--0.3.1--x.x.x.sql
upgrade script that you can similarly copy/paste
from supa_audit.
Self Hosted
supa_audit is set up as a native extension postgres extension. If you can connect to the machine running postgres, you can install by cloning the repo and running
make install
then create extension supa_audit
in the DB
Managed Platform
If you're on a managed platform (RDS, Google Cloud SQL etc) you won't have enough access to install it that way. But, since the extension is all SQL, you can copy the contents of the supa_audit--0.2.1.sql and execute it in your DB.
If you execute the SQL, it will not be necessary to run the create extension
command.
Be sure to make a note of the version number at the time you install so you can apply the upgrade patches as they become available e.g. supa_audit--0.2.1--0.2.2.sql
from supa_audit.
Thanks! I am on a managed platform and was hoping to avoid manually applying the migrations. I was thinking there could be two approaches to the *.sql. a) A migration from prior for people already running supa_audit, and b) a current "full install" .sql that you just run, and then from that point just apply migrations as they come out.
Super cool extension BTW!
from supa_audit.
b) a current "full install" .sql
This would be the supa_audit--0.2.1.sql file. Its a complete install assuming you're on a new DB
a) A migration from prior for people already running supa_audit
That would the migrations in the form supa_audit--<old_version>--<new_version>.sql
For example: we currently provide supa_audit--0.2.1.sql
, for new installs and supa_audit--0.1.0--0.2.0.sql
+ supa_audit--0.2.0--0.2.1.sql
for people who had previously installed the extension and now want to upgrade to the latest version.
from supa_audit.
It's weird that this very helpful extension isn't available via the Extensions area in hosted Supabase. I ran the SQL manually but I'd much prefer installation via your platform.
from supa_audit.
We make lots of prototypes at supabase!
Many of them are functional but not a generic enough fit for our user base to add them to the platform. In the case of auditing, we wanted to keep the community on pgaudit, which is much more flexible/scalable. That said, I'm glad you see value in this project, it was fun to create
from supa_audit.
Related Issues (20)
- How can I use this extension for foreign tables since primary key constraints are not supported on foreign tables . HOT 4
- Triggers should be `after`
- Record the `application_name` connection parameter HOT 1
- Enable auditing, but ignore specific columns HOT 1
- v0.2.0 make, cannot stat './/supa_audit--0.1.0.sql' HOT 7
- ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883) HOT 2
- How can we use this extension when primary key is already in UUID format? HOT 2
- Include user who made change (assuming a system where every user also has a postgres role) HOT 1
- Does not install on Supabase unless `extensions` schema on search_path HOT 1
- Fails on insert in a table when the inserted row is as a result of auth.users trigger HOT 1
- Error when selecting the "Server Error" filter on Auth audit logging HOT 1
- Audit table cannot be backed up HOT 2
- Applying extension via migrations not working for 0.3.1 HOT 1
- running 0.3.1 standalone SQL file throws error HOT 1
- Add supa_audit to extensions lib HOT 1
- Can't copy & paste supa_audit--0.3.1.sql to create the extension anymore HOT 3
- Error when running script HOT 1
- Audit Selects / Reads HOT 1
- A version that shows changes (diff) made by UPDATE operations. HOT 2
- Why I am getting this error on insert - record "old" is not assigned yet ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supa_audit.