pg-migration
Advanced tools
@@ -79,5 +79,5 @@ <?xml version="1.0" encoding="UTF-8"?> | ||
| <option value="$PROJECT_DIR$/.gitignore" /> | ||
| <option value="$PROJECT_DIR$/package.json" /> | ||
| <option value="$PROJECT_DIR$/README.md" /> | ||
| <option value="$PROJECT_DIR$/src/index.js" /> | ||
| <option value="$PROJECT_DIR$/package.json" /> | ||
| </list> | ||
@@ -323,5 +323,5 @@ </option> | ||
| <frame x="0" y="0" width="1440" height="900" extended-state="6" /> | ||
| <editor active="true" /> | ||
| <editor active="false" /> | ||
| <layout> | ||
| <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2532189" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | ||
| <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2532189" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> | ||
| <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> | ||
@@ -328,0 +328,0 @@ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> |
+3
-0
@@ -17,2 +17,5 @@ 'use strict'; | ||
| // Promise polyfill for ES5 compatibility | ||
| require('es6-promise').polyfill(); | ||
| function log(level, message) { | ||
@@ -19,0 +22,0 @@ var obj = { |
+2
-1
| { | ||
| "name": "pg-migration", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Apply changesets of your data structure for Postgresql easily from your node application", | ||
@@ -34,2 +34,3 @@ "main": "lib/index.js", | ||
| "dependencies": { | ||
| "es6-promise": "^3.0.2", | ||
| "fs-extra": "^0.26.4", | ||
@@ -36,0 +37,0 @@ "pg": "^4.4.3" |
+7
-8
@@ -11,10 +11,4 @@ # pg-migration | ||
| Before you can use this, ensure the database has at least one table. | ||
| You will need the following SQL for this | ||
| pg-migration will automatically create the table (`dbchangelog`) for you. | ||
| ```sql | ||
| CREATE TABLE dbchangelog(id bigint, datetime timestamp with time zone); | ||
| CREATE UNIQUE index changeset on dbchangelog(id); | ||
| ``` | ||
| ## How to use | ||
@@ -28,3 +22,8 @@ | ||
| Since the changeset id is derived from the file name, you can use the following command to create a new one `touch `date +%Y%m%d%H%M%S`.sql`. | ||
| Since the changeset id is derived from the file name, you can use the following command to create a new one | ||
| ```bash | ||
| touch `date +%Y%m%d%H%M%S`.sql | ||
| ``` | ||
| Please be careful that the files will be executed in a alphabetically sorted fashion, so ensure that files do not depend on anything later (it's really a poor mans Liquibase). |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
104
1.96%32145
-0.16%3
50%28
-3.45%+ Added
+ Added