dbmate 2.27.0 → 2.29.0

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.
Files changed (2) hide show
  1. package/README.md +16 -0
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -362,6 +362,22 @@ create table users (
362
362
  -- migrate:down
363
363
  ```
364
364
 
365
+ For related changes, it is possible to include multiple migrations in a single file using additional `migrate:up` and `migrate:down` sections. Migration file either succeeds or fails as a whole.
366
+
367
+ ```sql
368
+ -- migrate:up
369
+ CREATE TABLE users (id SERIAL PRIMARY KEY);
370
+
371
+ -- migrate:down
372
+ DROP TABLE users;
373
+
374
+ -- migrate:up
375
+ ALTER TABLE users ADD COLUMN email VARCHAR;
376
+
377
+ -- migrate:down
378
+ ALTER TABLE users DROP COLUMN email;
379
+ ```
380
+
365
381
  > Note: Migration files are named in the format `[version]_[description].sql`. Only the version (defined as all leading numeric characters in the file name) is recorded in the database, so you can safely rename a migration file without having any effect on its current application state.
366
382
 
367
383
  ### Running Migrations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbmate",
3
- "version": "2.27.0",
3
+ "version": "2.29.0",
4
4
  "description": "A lightweight, framework-agnostic database migration tool",
5
5
  "repository": "https://github.com/amacneil/dbmate",
6
6
  "homepage": "https://github.com/amacneil/dbmate#readme",
@@ -24,12 +24,12 @@
24
24
  "build": "tsc --build"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@dbmate/linux-ia32": "2.27.0",
28
- "@dbmate/linux-x64": "2.27.0",
29
- "@dbmate/linux-arm": "2.27.0",
30
- "@dbmate/linux-arm64": "2.27.0",
31
- "@dbmate/darwin-x64": "2.27.0",
32
- "@dbmate/darwin-arm64": "2.27.0",
33
- "@dbmate/win32-x64": "2.27.0"
27
+ "@dbmate/linux-ia32": "2.29.0",
28
+ "@dbmate/linux-x64": "2.29.0",
29
+ "@dbmate/linux-arm": "2.29.0",
30
+ "@dbmate/linux-arm64": "2.29.0",
31
+ "@dbmate/darwin-x64": "2.29.0",
32
+ "@dbmate/darwin-arm64": "2.29.0",
33
+ "@dbmate/win32-x64": "2.29.0"
34
34
  }
35
35
  }