pg-triggers 0.3.0 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -7
- package/lib/enance.sql +1 -1
- package/lib/recreate-his.sql +1 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -5,10 +5,6 @@ Triggers for postgres
|
|
|
5
5
|

|
|
6
6
|
[](https://npmjs.org/package/pg-triggers)
|
|
7
7
|
[](https://npmjs.org/package/pg-triggers)
|
|
8
|
-
[](https://travis-ci.org/emilioplatzer/pg-triggers)
|
|
9
|
-
[](https://coveralls.io/r/emilioplatzer/pg-triggers)
|
|
10
|
-
[](https://david-dm.org/emilioplatzer/pg-triggers)
|
|
11
|
-
|
|
12
8
|
|
|
13
9
|
|
|
14
10
|
language: 
|
|
@@ -28,12 +24,11 @@ $ psql < lib/enance.sql
|
|
|
28
24
|
$ psql -c "select enance_table('state','country,state')"
|
|
29
25
|
```
|
|
30
26
|
You must call enance_table(table_name, primary_key_fields) for each table that you want to audit changes on each time you create a table or alter the primary key.
|
|
31
|
-
By default the function will audit inserts, updates and deletes. But exists a third parameter **method** (optional). If this param receives the 'ud' value won't audit inserts
|
|
32
|
-
(only will listen for updates and deletes)
|
|
33
27
|
|
|
34
28
|
# Devel
|
|
35
29
|
```sh
|
|
36
|
-
$ npm install
|
|
30
|
+
$ npm install
|
|
31
|
+
$ psql --file install/create_db.sql
|
|
37
32
|
$ npm test
|
|
38
33
|
```
|
|
39
34
|
|
package/lib/enance.sql
CHANGED
package/lib/recreate-his.sql
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-triggers",
|
|
3
3
|
"description": "Triggers for postgres",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"author": "Emilio Platzer <emilioplatzer@gmail.com>",
|
|
6
6
|
"repository": "emilioplatzer/pg-triggers",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"mocha": "
|
|
15
|
-
"nyc": "
|
|
16
|
-
"best-globals": "
|
|
17
|
-
"discrepances": "
|
|
18
|
-
"mini-tools": "
|
|
19
|
-
"pg-promise-strict": "
|
|
14
|
+
"mocha": "^10.4.0",
|
|
15
|
+
"nyc": "^15.1.0",
|
|
16
|
+
"best-globals": "^1.1.4",
|
|
17
|
+
"discrepances": "^0.2.8",
|
|
18
|
+
"mini-tools": "^1.12.1",
|
|
19
|
+
"pg-promise-strict": "^1.4.0"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">= 16"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"start": "node example/server.js",
|