stepwise-migrations 1.0.12 → 1.0.14
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 +4 -4
- package/package.json +1 -1
- package/src/db.ts +1 -1
package/README.md
CHANGED
@@ -7,13 +7,13 @@ Loosely based on flyway.
|
|
7
7
|
|
8
8
|
## Instructions
|
9
9
|
|
10
|
-
Name up migration files as `.sql` and down migration files with the same name but suffixed with `.down.sql`.
|
11
|
-
e.g. `v1_users.sql` and `v1_users.down.sql`.
|
12
|
-
NOTE: Down migrations are optional.
|
13
|
-
|
14
10
|
Up migrations are first sorted in ascending order based on filename.
|
15
11
|
No subdirectories are read below the migration directory.
|
16
12
|
|
13
|
+
Name the "up" migration files as `.sql` and the "down" migration files with the same name but suffixed with `.down.sql`.
|
14
|
+
e.g. `v1_users.sql` and `v1_users.down.sql`.
|
15
|
+
Down migrations are optional.
|
16
|
+
|
17
17
|
## Usage
|
18
18
|
|
19
19
|
```text
|
package/package.json
CHANGED
package/src/db.ts
CHANGED
@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS ${schema}.stepwise_migrations (
|
|
85
85
|
CREATE TABLE IF NOT EXISTS ${schema}.stepwise_audit (
|
86
86
|
id SERIAL PRIMARY KEY,
|
87
87
|
type TEXT NOT NULL,
|
88
|
-
name TEXT
|
88
|
+
name TEXT NOT NULL,
|
89
89
|
script TEXT NOT NULL,
|
90
90
|
applied_by TEXT NOT NULL DEFAULT current_user,
|
91
91
|
applied_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|