Skip to content

Commit

Permalink
update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Aug 14, 2024
1 parent 1ba080a commit bfceec3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ If you are using a driver that is not yet supported, namely [`SQLx`](https://git
- Migrations, both .sql files and Rust modules must be named in the format `[U|V]{1}__{2}.sql` or `[U|V]{1}__{2}.rs`, where `{1}` represents the migration version and `{2}` the name.
- Migrations can be run either by embedding them in your Rust code with `embed_migrations` macro, or via [refinery_cli].

NOTE:

- By default, migration version numbers are restricted to `i32` (signed, 32-bit integers).
- If you enable the `int8-versions` feature, this restriction is lifted to being able to use `i64`s for your migration version numbers.
Bear in mind that this feature must be enabled *before* you start using refinery on a given database.
Migrating an existing database's `refinery_schema_history` table to use `int8` versions will break the checksums on all previously-applied migrations.

### Example: Library
```rust,no_run
use rusqlite::Connection;
Expand All @@ -53,13 +60,6 @@ fn main() {
For more library examples, refer to the [`examples`](https://github.com/rust-db/refinery/tree/main/examples).
### Example: CLI

NOTE:

- By default, migration version numbers are restricted to `i32` (signed, 32-bit integers).
- If you enable the `int8-versions` feature, this restriction is lifted to being able to use `i64`s for your migration version numbers (yay timestamps!).
Bear in mind that this feature must be enabled *before* you start using refinery on a given database.
Migrating an existing database's `refinery_schema_history` table to use `int8` versions will break the checksums on all previously-applied migrations, which is... bad.

```bash
export DATABASE_URL="postgres://postgres:secret@localhost:5432/your-db"
pushd migrations
Expand Down

0 comments on commit bfceec3

Please sign in to comment.