diff --git a/README.md b/README.md index 644e2c8..0c2b8c2 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,6 @@ In the near future, you will also be able to execute bulk migrations for all ten - PostgreSQL - SQLite - - ### Installation This bundle requires @@ -22,7 +20,6 @@ This bundle requires - [Doctrine Bundle](https://github.com/doctrine/DoctrineBundle) - [Doctrine Migration Bundle](https://github.com/doctrine/DoctrineMigrationsBundle) v3+ to run - Install using Composer ```sh @@ -70,10 +67,10 @@ doctrine_migrations: `Example new SwitchDbEvent(1)` 9. You can switch between all tenants dbs just by dispatch the same event with different db identifier. 10. Now your instance from `TenantEntityManager` is connected to the tenant db with Identifier = 1. -11. ts recommended having your tenant entities in a different directory from your Main entities. +11. It's recommended having your tenant entities in a different directory from your Main entities. 12. You can execute doctrine migration commands using our proxy commands for tenant database. - php bin/console tenant:database:create # t:d:c for short , To create and exceute migraiton for non exist tenant db + php bin/console tenant:database:create # t:d:c for short , To create and execute migration for non existing tenant db php bin/console tenant:migration:diff 1 # t:m:d 1 for short , To generate migraiton for tenant db => 1 @@ -105,20 +102,20 @@ doctrine_migrations: example ` $this->dispatcher->dispatch(new SwitchDbEvent($tenantDb->getId()));` then you can use the `TenantEntityManager` to execute your queries. 7. You can add a relation between your tenant entity and the `TenantDbConfig` entity to get the tenant db config easily. ```php - dispatcher->dispatch(new SwitchDbEvent($this->getUser()->getTenantDbConfig()->getId())); // Now you can use the tenant entity manager to execute your queries. - } + } } ``` 8. You can use the custom doctrine commands for tenant databases to perform the same doctrine commands on tenant databases. @@ -127,7 +124,7 @@ doctrine_migrations: 9. Now You can work with the `TenantEntityManager` as you work with the main entity manager. 10. You can now add or delete entities from the main or tenant databases and generate migrations for each database separately. ```php -