Download the PHP package smakecloud/skeema without Composer
On this page you can find all versions of the php package smakecloud/skeema. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smakecloud/skeema
More information about smakecloud/skeema
Files in smakecloud/skeema
Package skeema
Short Description Laravel Skeema Migrations
License MIT
Homepage https://github.com/smakecloud/skeema
Informations about the package skeema
Laravel Skeema
This laravel package provides a set of commands to help you manage your database schema during development and CI/CD pipelines using Skeema.
Skeema is a schema management system for MySQL and MariaDB. It enables management of table definitions and schema changes in a declarative fashion using pure SQL.
✅ Avoid downtimes during migrations.
✅ Lint your schema files with customizable rulests.
✅ Diff your schema files against your database.
✅ Easy to integrate with your CI/CD pipeline.
✅ Utility commands to help you moving from laravel migrations to skeema schema files.
✅ Manage your database schema in a more declarative way.
Table of Contents
- Installation
- Configuration
- Usage
- Dumping the Schema
- Diffing the Schema
- Linting the Schema
- Pushing the Schema
- Pulling the Schema
- Deployment Checking
- Laravel Migrations to Skeema "converting"
- Quirks
- parallel-testing
- larastan
- Testing
- Roadmap
- Disclaimer
- Credits
- License
Installation
Use the install.sh script to install skeema and gh-ost.
Install the package:
Publish the config file:
Configuration
The package will use the default configuration file config/skeema.php
to run the skeema commands.
Checkout the Skeema documentation for more information about the different configuration options.
Default skeema.php config file
Usage
Run php artisan skeema -h
to see all available commands and options.
Commands
- [Dumping the schema](#dumping-the-schema) - [Linting the schema](#linting-the-schema) - [Diffing the schema](#diffing-the-schema) - [Pushing the schema](#pushing-the-schema) - [Pulling the schema](#pulling-the-schema) - [Migrating the schema](#migrating-the-schema)Dumping the schema
SetUp function, run it once, push to version control
Check the generated skeema dir ( database/skeema by default ) after running the command to make sure it's correct.
Linting the schema
Lint the schema files with your configured rules.
Take a look at skeema linting documentation for more information.
Diffing the schema
Diff the schema files against the database.
Take a look at skeema diffing documentation for more information.
Pushing the schema
Push the schema files to the database.
Take a look at skeema pushing documentation for more information.
Pulling the schema
Pull the schema files from the database.
Take a look at skeema pulling documentation for more information.
Deployment Checking
This should not be used in production environments, run it in a dedicated CI environment !
This custom command checks for existing laravel migrations, mysql-dump files, or running gh-ost migrations.
This can be usefull for pre-deployment checks ( in CI/CD pipelines ).
Laravel Migrations to Skeema "converting"
This should not be used in production environments, run it in development environments only !
Does not work with Laravel squashed schema dumps out of the box!
Instead:
php artisan skeema:pull
to pull the schema from the database. ( After making sure that the database is up to date )
This custom command "converts" existing laravel migrations to skeema schema files. This is achieved by executing the following steps:
- Force pushing the current skeema files to the database ( Skippable with
--no-push
) - Looping through existing laravel migrations
- If the have been executed already, they will be deleted
- If they haven't been executed yet, they will be executed and then deleted
- Pulling the new skeema files from the database
Quirks
Parallel Testing
You have to limit the skeema option tmp-schema-threads
to 1.
For example:
tests/Concerns/ResetsData.php
Larastan
To use this package in combination with Larastan you have to add the skeema dumpfiles dir to the phpstan paramaters like this:
phpstan.neon.dist
Testing
With coverage
Roadmap
- GitHub Actions Examples
- Deployment Instructions
Disclaimer
This package is not affiliated with Skeema in any way.
Read the documentation of Skeema before using this package !
We don't take any responsibility for any damage caused by this package.
License
The MIT License (MIT). Please see License File for more information.
Credits
- Daursu - for the initial idea
- Skeema - making all of this possible
- GitHub - gh-ost
- Percona - pt-online-schema-change
- Smake® IT GmbH
All versions of skeema with dependencies
illuminate/console Version ^9.0|^10.0
illuminate/database Version ^9.0|^10.0
illuminate/filesystem Version ^9.0|^10.0
illuminate/support Version ^9.0|^10.0
laravel/framework Version ^9.0|^10.0
symfony/console Version ^5.0|^6.0
symfony/process Version ^5.0|^6.0