I have just released version 2 of RockMigrations:
GitHub: https://github.com/baumrock/RockMigrations
Modules Directory: https://processwire.com/modules/rock-migrations/
Please star the module on GitHub if you like it ?
Are you unsure if RockMigrations is the right tool for you?
@Jonathan Lahijani in a very nice PM ?
Read the full post here
Read the full post here
Read the full post here
QuickStart
The example code uses bd() calls for dumping data. You need TracyDebugger installed!
Put this in your site/migrate.php
/** @var RockMigrations $rm */
$rm = $modules->get("RockMigrations");
bd('Create field + template via RM');
$rm->createField('demo', 'text', [
'label' => 'My demo field',
'tags' => 'RMDemo',
]);
$rm->createTemplate('demo', [
'fields' => [
'title',
'demo',
],
'tags' => 'RMDemo',
]);
Reload your site and you will see the new field and template in the backend and you'll see the message in the tracy debug bar.