Skip to content

Commit a77ae06

Browse files
committed
Improve README docs
1 parent caba0b3 commit a77ae06

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77

88
A PostgreSQL migration library inspired by the Stack Overflow system described in [Nick Craver's blog](http://nickcraver.com/blog/2016/05/03/stack-overflow-how-we-do-deployment-2016-edition/#database-migrations).
99

10+
Migrations are defined in sequential SQL files, for example:
11+
12+
```text
13+
migrations
14+
├ 1_create-table.sql
15+
├ 2_alter-table.sql
16+
└ 3_add-index.sql
17+
```
18+
1019
Requires Node 10.17.0+
1120

1221
Supports PostgreSQL 9.4+
@@ -114,9 +123,9 @@ Previously run migration scripts shouldn't be modified, since we want the proces
114123

115124
This is enforced by hashing the file contents of a migration script and storing this in `migrations` table. Before running a migration, the previously run scripts are hashed and checked against the database to ensure they haven't changed.
116125

117-
### Each migration run in a transaction
126+
### Each migration runs in a transaction
118127

119-
Ensures each migration is atomic. Either it completes successfully, or it is rolled back and the process is aborted.
128+
Running in a transaction ensures each migration is atomic. Either it completes successfully, or it is rolled back and the process is aborted.
120129

121130
An exception is made when `-- postgres-migrations disable-transaction` is included at the top of the migration file. This allows migrations such as `CREATE INDEX CONCURRENTLY` which cannot be run inside a transaction.
122131

0 commit comments

Comments
 (0)