php-censor/src/Migrations/20150308074509_add_user_providers.php
2018-03-09 13:46:18 +07:00

35 lines
818 B
PHP

<?php
use Phinx\Migration\AbstractMigration;
class AddUserProviders extends AbstractMigration
{
public function up()
{
// Add the provider columns
$this
->table('user')
// The provider name
->addColumn('provider_key', 'string', [
'default' => 'internal',
'limit' => 255
])
// A data used by the provider
->addColumn('provider_data', 'string', [
'null' => true,
'limit' => 255
])
->save();
}
public function down()
{
// Remove the provider columns
$this
->table('user')
->removeColumn('provider_key')
->removeColumn('provider_data')
->save();
}
}