https://github.com/rareloop/hatchet-migrations
https://github.com/rareloop/hatchet-migrations
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rareloop/hatchet-migrations
- Owner: Rareloop
- Created: 2020-04-16T14:37:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T14:17:25.000Z (about 5 years ago)
- Last Synced: 2024-12-29T07:43:15.478Z (6 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hatchet Migrations
Provides a wrapper around the [Phinx Database Migrations](https://phinx.org/) package that integrates with Hatchet & Lumberjack.
## Installation
`composer require rareloop/hatchet-migrations`
Once installed, register the Service Provider in config/app.php:
```php
'providers' => [
...Rareloop\Hatchet\Migrations\MigrationsServiceProvider::class,
...
],
```Copy the example `config/migrations.php` file to you theme directory _(optional)_.
Make sure you create the needed folders for your migrations and seeds. If you don't change the default config then these will be:
- `{theme}/database/migrations`
- `{theme}/database/seeds`## Usage
This package makes the following commands are available to you:
| Hatchet Command | Description | Related Phinx Documentation |
| :--- | :--- | :--- |
| `make:migration` | Create a new migration file | [phinx create](https://book.cakephp.org/phinx/0/en/migrations.html#creating-a-new-migration) |
| `migrate` |Run migration(s) | [phinx migrate](https://book.cakephp.org/phinx/0/en/commands.html#the-migrate-command) |
| `migrate:rollback` | Rollback migration(s) | [phinx rollback](https://book.cakephp.org/phinx/0/en/commands.html#the-rollback-command) |
| `migrate:status` | Output the current status on which migrations have been run | [phinx status](https://book.cakephp.org/phinx/0/en/commands.html#the-status-command) |
| `make:seeder` | Create a Database Seeder | [phinx seed:create](https://book.cakephp.org/phinx/0/en/seeding.html) |
| `db:seed` | Run seed(s) | [phinx seed:run](https://book.cakephp.org/phinx/0/en/commands.html#the-seed-run-command) |For usage information on each command either consult the associated Phinx documentation or use the hatchet CLI:
`php hatchet help {command}`