mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01:00
28 lines
724 B
PHP
28 lines
724 B
PHP
|
<?php
|
||
|
|
||
|
namespace Application\Migrations;
|
||
|
|
||
|
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||
|
use Doctrine\DBAL\Schema\Schema;
|
||
|
|
||
|
class Version20160812120952 extends AbstractMigration
|
||
|
{
|
||
|
/**
|
||
|
* @param Schema $schema
|
||
|
*/
|
||
|
public function up(Schema $schema)
|
||
|
{
|
||
|
$this->addSql('ALTER TABLE wallabag_oauth2_clients ADD name CLOB DEFAULT NULL COLLATE BINARY');
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param Schema $schema
|
||
|
*/
|
||
|
public function down(Schema $schema)
|
||
|
{
|
||
|
$this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
|
||
|
$this->addSql('ALTER TABLE wallabag_oauth2_clients DROP COLUMN name;
|
||
|
');
|
||
|
}
|
||
|
}
|