-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #756 from cakephp/reduce-phinx
Reduce phinx usage and stabilize backend inteface
- Loading branch information
Showing
18 changed files
with
204 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Migrations\Migration; | ||
|
||
interface BackendInterface | ||
{ | ||
/** | ||
* Returns the status of each migrations based on the options passed | ||
* | ||
* @param array<string, mixed> $options Options to pass to the command | ||
* Available options are : | ||
* | ||
* - `format` Format to output the response. Can be 'json' | ||
* - `connection` The datasource connection to use | ||
* - `source` The folder where migrations are in | ||
* - `plugin` The plugin containing the migrations | ||
* @return array The migrations list and their statuses | ||
*/ | ||
public function status(array $options = []): array; | ||
|
||
/** | ||
* Migrates available migrations | ||
* | ||
* @param array<string, mixed> $options Options to pass to the command | ||
* Available options are : | ||
* | ||
* - `target` The version number to migrate to. If not provided, will migrate | ||
* everything it can | ||
* - `connection` The datasource connection to use | ||
* - `source` The folder where migrations are in | ||
* - `plugin` The plugin containing the migrations | ||
* - `date` The date to migrate to | ||
* @return bool Success | ||
*/ | ||
public function migrate(array $options = []): bool; | ||
|
||
/** | ||
* Rollbacks migrations | ||
* | ||
* @param array<string, mixed> $options Options to pass to the command | ||
* Available options are : | ||
* | ||
* - `target` The version number to migrate to. If not provided, will only migrate | ||
* the last migrations registered in the phinx log | ||
* - `connection` The datasource connection to use | ||
* - `source` The folder where migrations are in | ||
* - `plugin` The plugin containing the migrations | ||
* - `date` The date to rollback to | ||
* @return bool Success | ||
*/ | ||
public function rollback(array $options = []): bool; | ||
|
||
/** | ||
* Marks a migration as migrated | ||
* | ||
* @param int|string|null $version The version number of the migration to mark as migrated | ||
* @param array<string, mixed> $options Options to pass to the command | ||
* Available options are : | ||
* | ||
* - `connection` The datasource connection to use | ||
* - `source` The folder where migrations are in | ||
* - `plugin` The plugin containing the migrations | ||
* @return bool Success | ||
*/ | ||
public function markMigrated(int|string|null $version = null, array $options = []): bool; | ||
|
||
/** | ||
* Seed the database using a seed file | ||
* | ||
* @param array<string, mixed> $options Options to pass to the command | ||
* Available options are : | ||
* | ||
* - `connection` The datasource connection to use | ||
* - `source` The folder where migrations are in | ||
* - `plugin` The plugin containing the migrations | ||
* - `seed` The seed file to use | ||
* @return bool Success | ||
*/ | ||
public function seed(array $options = []): bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.