Odonno / surrealdb-migrations

An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.
https://crates.io/crates/surrealdb-migrations
MIT License
210 stars 16 forks source link

Error: Path "migrations/definitions" is not a file! #39

Closed happysalada closed 1 year ago

happysalada commented 1 year ago

using surrealdb-migrations 0.9.9 trying to apply migrations created from a template made with 0.9.6, I get the error in the title. I'm running surrealdb-migrations apply with 3 folders, events, schemas and migrations my migrations folder contains the following


ls migrations/
│ 0 │ migrations/20230517_113302_InitialSetup.surql │ 4.2 KB │
│ 1 │ migrations/down                               │    3 B │
│ 2 │ migrations/definitions                        │    2 B │

do I have to move my migration inside the definitions folder ?

I didn't have a definitions folder, but when I run the apply, it creates it for me.
Odonno commented 1 year ago

Hi @happysalada

This error is fixed in v0.9.10

Odonno commented 1 year ago

For information, the definitions folder is created to get a reference of the schema for each migration point to detect upcoming schema changes and also to reapply schema changes in the right order (when applying migrations on a clean db for example).

This is indeed a missing information and I will plan to add it in the documentation soon.