refinery: Migration files are no longer detected when using the master branch

While investigating an int conversion issue when using CockroachDB, I noticed that migrations didn’t work at all on the master branch:

INFO  refinery_migrations::traits::r#async > no migrations to apply

I’ll see this even after dropping all the tables, including the schema migrations table.

This seems to be a regression from the version on crates.io. I didn’t see a branch for the older version but was able to dig out the release commit for 0.2. I applied the int conversion patch to confirm that the old version works as expected (and it does).

https://github.com/aloucks/refinery/tree/version-i64

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Could you provide something like this:

.
├── Cargo.toml
├── migrations
│  ├── V1__initial.sql
│  └── V2__gateway_tables.sql
└── src
   └── main.rs
// main.rs
mod embedded {
    refinery::embed_migrations!("./migrations");
}

^ this is layout I’m using and it works as expected

after i added the double dashes “__” it worked i.e: V1_init.sql - does not work V1__init.sql - works like a charm