Skip to content

Commit

Permalink
Merge pull request #6 from Panamus/master
Browse files Browse the repository at this point in the history
Updated documentation to remove filename ambiguity
  • Loading branch information
polevaultweb authored Apr 9, 2020
2 parents bd00b04 + d83d4b3 commit 7297ded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ You need to have access to run WP CLI on the server. Typically `wp dbi migrate`
By default, the command will look for migration files in `/app/migrations` directory alongside the vendor folder. This can be altered with the filter `dbi_wp_migrations_path`.
Other paths can be added using the `dbi_wp_migrations_paths` filter.

Migration file names should follow the `yyyy_mm_dd_classname` format, eg. 2020_04_09_AddCustomTable.php

An example migration to create a table would look like:

**2020_04_09_AddCustomTable.php**
```
<?php
Expand Down Expand Up @@ -84,4 +87,4 @@ class AddPricingPage extends AbstractMigration {

You can run specific migrations using the filename as an argument, eg. `wp dbi migrate AddCustomTable`.

To rollback all migrations you can run `wp dbi migrate --rollback`, or just a specific migration `wp dbi migrate AddCustomTable --rollback`.
To rollback all migrations you can run `wp dbi migrate --rollback`, or just a specific migration `wp dbi migrate AddCustomTable --rollback`.

0 comments on commit 7297ded

Please sign in to comment.