PHP code example of macwinnie / wp-db-phinx-helper
1. Go to this page and download the library: Download macwinnie/wp-db-phinx-helper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
macwinnie / wp-db-phinx-helper example snippets
class MyPlugin extends DBUtilisator {
public static function plugin_activation_method () {
parent::plugin_activation_method(); # ensures Phinx config placed and migrations run on install / activation / update
}
public static function plugin_uninstall_method () {
parent::plugin_uninstall_method(); # ensures Phinx migrations rolled back in Database on Plugin uninstall
}
}
sh
cp vendor/macwinnie/wp-db-phinx-helper/files/phinx.php ./