Code Monkey home page Code Monkey logo

sachintha00 / multi-tenant-wizard Goto Github PK

View Code? Open in Web Editor NEW
19.0 0.0 0.0 35 KB

πŸ›ΈπŸ» This package streamlines the migration process for Software as a Service (SaaS) for Laravel web applications where tenant data is stored in separate databases. It eliminates the need to manually adjust database configuration files for each tenant, offering a scalable solution for database management.

Home Page: https://github.com/sachintha00

License: MIT License

PHP 100.00%
artisan artisan-command artisan-commands laravel-package multitenancy multitenant laravelartisan laravelmultitenant

multi-tenant-wizard's Introduction

Easy2Dev Laravel Tenant Migrate

Easy2Dev Laravel Tenant Migrate is a Laravel package designed to simplify database migration for multi-tenant applications, particularly those employing PostgreSQL databases.

This package streamlines the migration process for Software as a Service (SaaS) for Laravel web applications where tenant data is stored in separate databases. It eliminates the need to manually adjust database configuration files for each tenant, offering a scalable solution for database management.

Features

  • Seamless migration of tenant databases without manual configuration adjustments.
  • Support for multiple migration commands tailored for tenant databases.
  • Simultaneous migration of multiple tenant databases using database prefixes.
  • Compatibility with Laravel artisan commands for streamlined workflow integration.

Installation

To install Easy2Dev Laravel Tenant Migrate, follow these steps:

  1. Install the package via Composer:
composer require easy2dev/multi-tenant-wizard
  1. Verify the installation by running php artisan. If the package commands are listed, the installation was successful.

Usage

Easy2Dev Laravel Tenant Migrate provides the following artisan commands for managing tenant databases:

Create Postgresql Database

php artisan tenant:database:create [database-name]
Parameter Description
database-name Required. The name of the specific tenant database to be create

Migrate a Specific Tenant Database

php artisan tenant:migrate [database-name] [--path=]
Parameter Description
database-name Required. The name of the specific tenant database to be migrate
--path= Optional. The path to the schemas to be migrated (Default location is /database/migrations/tenant)

Migrate All Tenant Database

php artisan tenant:migrate:all [database-prefix] [--path=]
Parameter Description
database-prefix Required. The common prefix shared by the names of the tenant databases to be migrated
--path= Optional. The path to the schemas to be migrated (Default location is /database/migrations/tenant)

Migrate Rollback All Tenant Databases

php artisan tenant:migrate:rollback [database-prefix] [--step=]
Parameter Description
database-prefix Required. The common prefix shared by the names of the tenant databases to be rollback
--steps= Optional. Specifies the number of migration steps to roll back.

Migrate Refresh All Tenant Databases

php artisan tenant:migrate:refresh [database-prefix] [--step=]
Parameter Description
database-prefix Required. The common prefix shared by the names of the tenant databases to be refresh
--path= Optional. The path to the schemas to be migrated (Default location is /database/migrations/tenant)

Migrate Reset All Tenant Databases

php artisan tenant:migrate:reset [database-prefix]
Parameter Description
database-prefix Required. The common prefix shared by the names of the tenant databases to be reset

Seed Data for All Tenant Databases

php artisan tenant:db:seed [database-prefix]
Parameter Description
database-prefix Required. The common prefix shared by the names of the tenant databases where data will be seeded

License

This project is licensed under the MIT License.

Acknowledgments

Special thanks to our contributors and supporters for their valuable contributions to this project.

Author

@SachinthaMadhawa

multi-tenant-wizard's People

Contributors

sachintha00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-tenant-wizard's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.