Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yubarajshrestha committed Oct 31, 2023
1 parent 98b912d commit 23e55ee
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Expand Up @@ -101,7 +101,7 @@ python craft tenancy:migrate --tenants=tenant1,tenant2
```

**Migrate all tenants**

```bash
python craft tenancy:migrate
```
Expand Down Expand Up @@ -135,7 +135,7 @@ Tenancy.create(
name='tenant1',
domain='tenant1.example.com',
database='tenant1',
)
)
```

**Get tenant**
Expand All @@ -154,7 +154,7 @@ Tenancy.get_tenant_by_database('tenant1')
```

**Delete tenant**

```python
from multitenancy.facades import Tenancy

Expand Down Expand Up @@ -208,7 +208,7 @@ with TenantContext(tenant=tenant) as ctx:
ctx.migrate_rollback()
ctx.migrate_reset()
ctx.migrate_status()

# seed the database
ctx.seed()
```
Expand All @@ -227,7 +227,6 @@ Route.get("/tenant-aware-routes", "WelcomeController@show").middleware("multiten

In above example, `/tenant-aware-routes` will be tenant aware. It means that if you have tenant setup and you are trying to access `/tenant-aware-routes` then you will get tenant specific items from the database.


### TODO

- [x] Different database server for each tenant
Expand All @@ -242,6 +241,4 @@ Please read the [Contributing Documentation](CONTRIBUTING.md) here.

### License


multitenancy is open-sourced software licensed under the [MIT license](LICENSE).

0 comments on commit 23e55ee

Please sign in to comment.