@noego/proper 0.2.2 → 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/bin/cli.js +70 -45
- package/bin/cli.js.map +1 -1
- package/bin/cli.mjs +79 -47
- package/bin/cli.mjs.map +1 -1
- package/bin/index.d.mts +5 -0
- package/bin/index.d.ts +5 -0
- package/bin/index.js +70 -45
- package/bin/index.js.map +1 -1
- package/bin/index.mjs +70 -45
- package/bin/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +8 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -60,7 +60,10 @@ Below is a fast-track on **how to work** with SQL Proper from the command line.
|
|
|
60
60
|
Always use `proper create` to mint the timestamp — never type one by hand.
|
|
61
61
|
Generated stamps never end in `0`, and `proper up` refuses to apply a
|
|
62
62
|
**pending** migration whose stamp ends in `000` (a tell-tale hand-typed
|
|
63
|
-
value). Migrations that were already applied are never re-checked.
|
|
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.
|
|
64
67
|
|
|
65
68
|
3. **Apply migrations**:
|
|
66
69
|
```bash
|
|
@@ -119,6 +122,10 @@ Here’s a sample `proper.json` for **SQLite** (change `"database": "sql"` if us
|
|
|
119
122
|
- **database**: Either `"sql"` (for MySQL) or `"sqlite"`.
|
|
120
123
|
- If using `"sql"`, fill out the `sql` object (`host`, `user`, `password`, `database`).
|
|
121
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.
|
|
122
129
|
- **host** / **user** / **password** / **database**: Standard MySQL connection details if `"database": "sql"`.
|
|
123
130
|
|
|
124
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`:
|