Open josecelano opened 4 months ago
Hi @josecelano. Do you generate the files in migration folder, or do you manually edit them?
Hi @josecelano. Do you generate the files in migration folder, or do you manually edit them?
Hi @ngthhu , you can do it manually if you want. What I usually do is:
sqlx migrate add torrust_add_field_xxx
. We use the prefix: torrust_
migrations
.migrations\mysql
and migrations\sqlite3
You can create the files with the datetime prefix.
After adding the migration, it will be executed automatically the next time you run the application.
Docs: https://docs.rs/torrust-index/3.0.0-alpha.2/torrust_index/#development
We are not using reversible migrations yet. I don't know why. The project was not using them when I started working on it. Maybe we can open a discussion to decide if we should support it.
Relates to: https://github.com/torrust/torrust-index-gui/discussions/521
We import this info from the tracker:
But we only store
seeders
andleechers
in the database:We could also persist the
completed
field to show that info on the frontend.This is the function that imports and stores that data.
Subtasks