2017 © Pedro PelĂĄez
 

library laravel-tenant-migrate

A2Way Laravel Tenant Migrate

image

a2way/laravel-tenant-migrate

A2Way Laravel Tenant Migrate

  • Monday, April 10, 2017
  • by budhajeewa
  • Repository
  • 3 Watchers
  • 13 Stars
  • 1,138 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 2 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

A2Way Laravel Tenant Migrate

A2Way Laravel Tenant Migrate is a Laravel package that can be used to migrate different databases without editing database configuration files., (*1)

This is specially useful for SaaS (Software as a Service) web applications that stores data of each tenant in different databases. Migrating databases like that can be very hard because you might have to change your database configuration for each tenant database. As you can imagine, this is not a very scalable solution., (*2)

A2Way Laravel Tenant Migrate can help you overcome this problem., (*3)

Financial Support

Consider financially supporting this project at https://www.patreon.com/budhajeewa., (*4)

Commands Available

Installing A2Way Laravel Tenant Migrate on your Laravel project will add following commands to your artisan tool., (*5)

  • migrate:tenant [connection-name] [database-name]
  • migrate:tenant:all [connection-name] [database-prefix]
  • migrate:tenant:install [connection-name] [database-name]
  • migrate:tenant:refresh [connection-name] [database-name]
  • migrate:tenant:reset [connection-name] [database-name]
  • migrate:tenant:rollback [connection-name] [database-name]

Each of above commands (Except migrate:tenant:all.) will perform the task of their cousin commands that has the similar name but for “tenant”. For an example, migrate:tenant:refresh myConnection myDatabase will run migrate:refresh on myDatabase, accessing it through connection details given in myConnection., (*6)

migrate:tenant:all will help you to migrate multiple tenant databases at once by specifying their prefix. For an example, if you have tenant databases named tnt_a, tnt_b, and tnt_c, executing migrate:tenant:all myConnection tnt_ will migrate all three databases., (*7)

Installing

  1. Issue the following command:
composer require a2way/laravel-tenant-migrate ^1.0
  1. Then add the following line to your Laravel app’s app/config/app.php file's providers sub-array.
A2way\LaravelTenantMigrate\LaravelTenantMigrateServiceProvider::class,
  1. Check the installation by issuing php artisan command. If you are able to see the above commands in your list of commands, installation was successful.

Development Setup

  1. Have Docker and Docker Compose.
  2. Clone this repo.
  3. Copy tmp.env file into .env and fill in values.
  4. Copy laravel/tmp.env file into .env and fill in values (App Key and DB settings.).
  5. Run docker-compose up.

The Versions

10/04 2017

dev-master

9999999-dev

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

10/04 2017

1.4.0

1.4.0.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

10/04 2017

dev-dev

dev-dev

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

10/04 2017

1.3.0

1.3.0.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

09/05 2015

1.2.2

1.2.2.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

23/04 2015

1.2.1

1.2.1.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

31/12 2014

1.2.0

1.2.0.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

 

by Supun Budhajeewa

laravel a2way

11/12 2014

v1.1.1

1.1.1.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

  • php >=5.4.0

 

by Supun Budhajeewa

laravel a2way

22/11 2014

v1.1.0

1.1.0.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

  • php >=5.4.0

 

by Supun Budhajeewa

laravel a2way

08/11 2014

v1.0.0

1.0.0.0

A2Way Laravel Tenant Migrate

  Sources   Download

The Requires

  • php >=5.4.0

 

by Supun Budhajeewa

laravel a2way