Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom migration commands for the enlighten tables #26

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

jeffochoa
Copy link
Collaborator

This allows us to run the package migrations separately from the app migrations.

It requires to publish the package migrations to the app folder.

php artisan vendor:publish --tag=enlighten-migrations

It also requires to set a new database connection in the config/database.php file:

[
    'enlighten' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => 'YOUR_ENLIGHTEN_DATABASE_NAME',
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],
]

Now you'll be able to run the following commands using artisan:

php artisan enlighten:migrate
php artisan enlighten:migrate:fresh

@jeffochoa jeffochoa added the enhancement New feature or request label Oct 26, 2020
@jeffochoa jeffochoa self-assigned this Oct 26, 2020
@jeffochoa jeffochoa changed the base branch from main to dev October 26, 2020 15:13
@jeffochoa jeffochoa merged commit faac7e3 into dev Oct 26, 2020
@jeffochoa jeffochoa deleted the feature/enlighten-migrations-command branch November 1, 2020 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant