@noego/proper 0.2.1 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noego/proper",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "module": "bin/index.mjs",
package/readme.md CHANGED
@@ -57,6 +57,14 @@ Below is a fast-track on **how to work** with SQL Proper from the command line.
57
57
  ```
58
58
  Edit those `.sql` files and add your migration scripts.
59
59
 
60
+ Always use `proper create` to mint the timestamp — never type one by hand.
61
+ Generated stamps never end in `0`, and `proper up` refuses to apply a
62
+ **pending** migration whose stamp ends in `000` (a tell-tale hand-typed
63
+ value). Migrations that were already applied are never re-checked. A
64
+ historical rounded key can be allowed only by listing that exact canonical
65
+ key in `legacy_migration_keys`; the strict check remains active for every
66
+ other key.
67
+
60
68
  3. **Apply migrations**:
61
69
  ```bash
62
70
  proper up
@@ -114,6 +122,10 @@ Here’s a sample `proper.json` for **SQLite** (change `"database": "sql"` if us
114
122
  - **database**: Either `"sql"` (for MySQL) or `"sqlite"`.
115
123
  - If using `"sql"`, fill out the `sql` object (`host`, `user`, `password`, `database`).
116
124
  - If using `"sqlite"`, define `"sqlite": { "database": "<path or :memory:>" }`.
125
+ - **legacy_migration_keys**: Optional array of exact canonical keys for known historical
126
+ migrations whose rounded timestamp ends in `000`. Paths, migration filenames,
127
+ wildcards, nonstrings, and noncanonical spellings are rejected; unlisted rounded
128
+ migrations remain blocked.
117
129
  - **host** / **user** / **password** / **database**: Standard MySQL connection details if `"database": "sql"`.
118
130
 
119
131
  Use `proper init` to quickly generate a default config, or manually create your own. When running the CLI, if your config isn’t in `proper.json`, specify `--config`: