Skip to content

Releases: py-package/masonite-multitenancy

0.0.5

17 Jul 09:05
76cf314
Compare
Choose a tag to compare

What's Changed

  • Added Tenancy Facade
  • Tenancy now uses Facade for managing connections
  • Added TenantContext, now you can change the connection on the fly
from multitenancy.contexts import TenantContext
from multitenancy.models.Tenant import Tenant

tenant = Tenant.where('name', '=', 'tenant1').first()

with TenantContext(tenant=tenant) as ctx:
    # do whatever you like in tenant 
    # ...
    # migrate the database
    ctx.migrate()
    ctx.migrate_refresh()
    ctx.migrate_rollback()
    ctx.migrate_reset()
    ctx.migrate_status()
    
    # seed the database
    ctx.seed()
  • Other minor enhancements and bug fixes

Full Changelog: 0.0.4...0.0.5

0.0.4

10 Jul 03:09
68287e2
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.0.3...0.0.4

0.0.3

09 Jul 16:41
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.0.2...0.0.3

0.0.2

08 Jul 12:46
Compare
Choose a tag to compare

Full Changelog: 0.0.1...0.0.2

0.0.1

08 Jul 12:29
Compare
Choose a tag to compare