docs caution about multi-threading with migrations

This commit is contained in:
silverqx
2022-05-24 15:52:53 +02:00
parent fba9be5170
commit 59fd5e3ce5
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -248,3 +248,7 @@ In addition, the third party libraries used by the `QSqlDrivers` can impose furt
In short, if you create a `DB::connection` in some thread then you have to use this connection only from this particular thread and of course all queries that will be executed on this connection.
If you want to execute some query from another thread for the same connection then you have to create a new connection first and if you have a new connection you can send a query from this new thread to the database.
:::caution
The [`schema builder`](database/migrations.mdx#tables) and [`migrations`](database/migrations.mdx) don't support multi-threading.
:::
+4
View File
@@ -41,6 +41,10 @@ The TinyORM `Schema` facade provides database agnostic support for creating and
Currently, TinyORM's schema builder provides first-party support for the MySQL and PostgreSQL database. Support for the SQLite databases is not implemented 😢.
:::
:::caution
The [`schema builder`](database/migrations.mdx#tables) and [`migrations`](database/migrations.mdx) don't support [multi-threading](database/getting-started.mdx#multi-threading-support).
:::
## Generating Migrations
You may use the `make:migration` `tom` command to generate a database migration. The new migration will be placed in your `database/migrations` directory. Each migration filename contains a timestamp that allows `tom` to determine the order of the migrations: