Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funny table names in migrations #273

Closed
RobertoMaurizzi opened this issue Oct 6, 2024 · 2 comments
Closed

Funny table names in migrations #273

RobertoMaurizzi opened this issue Oct 6, 2024 · 2 comments

Comments

@RobertoMaurizzi
Copy link

RobertoMaurizzi commented Oct 6, 2024

Hello!

I'm putting together a "personal learning" application with Leptos/Axum and since the objective is mostly to go and learn along the way I decided to use Butane instead of Sqlx.
For some reasons (and I'm not sure why, when or how) I found my SQLite db full of strange table names and, checking the migration folder, sure enough they were all there.

I can't really understand how names like WebPushDatintellijRulezz.table got created, since I never ever used any IntelliJ software on this computer (and in general).
I "solved" it by deleting the db, the .butane folder and then going again through build/makemigrations/init/migrate and now it works properly, but... I'm curious 😅

Attaching a zip file with the funny migration files since there's nothing important in them: funny_migrations.zip

@jayvdb
Copy link
Collaborator

jayvdb commented Oct 7, 2024

Very curious indeed.

Which IDE are you using @RobertoMaurizzi .

My guess is you have an IDE plugin/extension that is doing something behind the scenes, combined with rust-analyzer, that is triggering the #[model] macro which creates the .table files.

#216 is one of the issues open about how to clear out .table files that do not match the names of models according to the current source code.

@RobertoMaurizzi
Copy link
Author

I'm using neovim/LazyVim, that in turn uses rustacean.nvim 🤔🤔🤔
No IntelliJ anywhere in the system, not even Android Studio 😅
Unfortunately I created the migrations before realizing that passing a pool in the proper way in Axum isn't exactly straightforward if you never did it before, so the migration files stayed there for maybe a week...
Anyway, the nice thing about having automatic migrations is that's very quick and easy to re-create them :-)
Closing for now, I'll try to pay more attention next time I add tables or create a new application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants