Content-Length: 259637 | pFad | http://github.com/loadmemo/tenant-migrate/#start-of-content

18 GitHub - loadmemo/tenant-migrate: Add multi-tenant support for Laravel migrate command
Skip to content

Add multi-tenant support for Laravel migrate command

Notifications You must be signed in to change notification settings

loadmemo/tenant-migrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Tenant-migrate

Add multi-tenant support for Laravel migrate command

Installation

composer require envive/tenant-migrate

Automatic service registration

Using auto discovery, the tenancy package will be auto detected by Laravel automatically.

Manual service registration

In case you want to disable webserver integration or prefer manual integration, set the dont-discover in your application composer.json, like so:

{
    "extra": {
        "laravel": {
            "dont-discover": "envive/tenant-migrate"
        }
    }
}

If you disable auto discovery you are able to configure the providers by yourself.

Register the service provider in your config/app.php:

    'providers' => [
        // [..]
        // Tenant migrate.
         Envive\TenantMigrate\TenantMigrateServiceProvider::class,
    ],

Deploy configuration

Publish the configuration file so you can modify it to your needs:

 php artisan vendor:publish --provider=Envive\\TenantMigrate\\TenantMigrateServiceProvider

Open the config/tenant.php file and modify to your needs. Put your tenant database connection information into the connection and add tenant_prefix if needed.

This package will add seven commands below into your artisan list. You can get more information with option help.

  tenant:migrate           Run the database migrations with multi-tenant support
  tenant:migrate:fresh     Drop all tables and re-run all migrations with multi-tenant support
  tenant:migrate:install   Create the migration repository with multi-tenant support
  tenant:migrate:refresh   Reset and re-run all migrations with multi-tenant support
  tenant:migrate:reset     Rollback all database migrations with multi-tenant support
  tenant:migrate:rollback  Rollback the last database migration with multi-tenant support
  tenant:migrate:status    Show the status of each migration with multi-tenant support

About

Add multi-tenant support for Laravel migrate command

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/loadmemo/tenant-migrate/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy