for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Migrations\AbstractMigration;
class CreateAssets extends AbstractMigration
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
$table = $this->table('assets');
$table->addColumn('name', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('created', 'datetime', [
$table->addColumn('modified', 'datetime', [
$table->create();
}