PHP code example of restruct / silverstripe-database-migrations
1. Go to this page and download the library: Download restruct/silverstripe-database-migrations 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/ */
restruct / silverstripe-database-migrations example snippets
class MyModel extends DataObject
{
private static $table_name = 'MyModel';
// Old class names that should map to this class
private static $legacy_classnames = [
'Old\Namespace\MyModel',
'Another\Old\MyModel',
];
// Old table names that should be renamed to this class's table
private static $legacy_table_names = [
'OldTableName',
];
}