Closed igbanam closed 1 month ago
Is there some way I can see the generated SQL?
I quickly tried to reproduce this with a new project and a SQLite3 database but I wasn't able to get this syntax error. Which versions of Marten and SQLite3 are you using exactly?
This is my shards.lock
version: 2.0
shards:
db:
git: https://github.com/crystal-lang/crystal-db.git
version: 0.13.1
i18n:
git: https://github.com/crystal-i18n/i18n.git
version: 0.2.1
marten:
git: https://github.com/martenframework/marten.git
version: 0.5.0
msgpack:
git: https://github.com/crystal-community/msgpack-crystal.git
version: 1.3.4
sqlite3:
git: https://github.com/crystal-lang/crystal-sqlite3.git
version: 0.21.0
Is there some way I can see the generated SQL?
You can set the log_level
setting to Log::Severity::Debug
in your development settings file.
I am still not able to reproduce, and I have the exact same shards as you. Would you be able to share the full model definition with which you are encountering this and the generated migrations? 🙏
Unfortunately, the project I saw this in is not backed by Git properly. So I can't go back in time and recreate the issue. But if I run into this issue again, I'll be sure to document the path to the issue properly, and share that.
I had a model with a UUID primary key.
genmigrations
andmigrate
worked fine here.I changed this to use an integer instead
genmigrations
works, but I have this error when Imigrate