*/
public function down(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
$this->addSql('ALTER TABLE '.$this->getTable('oauth2_clients').' DROP COLUMN name');
}
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
*/
public function down(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
$this->addSql('ALTER TABLE "'.$this->getTable('config').'" DROP pocket_consumer_key');
$this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('pocket_consumer_key', NULL, 'import')");
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
$this->addSql('ALTER TABLE '.$this->getTable('tag').' CHANGE `label` `label` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
$this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE `name` `name` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci;');
-
}
}
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
*/
public function up(Schema $schema)
{
- $this->addSql("INSERT INTO \"".$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
+ $this->addSql('INSERT INTO "'.$this->getTable('craue_config_setting')."\" (name, value, section) VALUES ('download_images_enabled', 0, 'misc')");
}
/**
*/
public function down(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() == 'sqlite', 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
- $this->addSql("DELETE FROM \"".$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';");
+ $this->addSql('DELETE FROM "'.$this->getTable('craue_config_setting')."\" WHERE name = 'download_images_enabled';");
}
}
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
*/
public function down(Schema $schema)
{
-
}
}
*/
public function down(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
$this->addSql('ALTER TABLE '.$this->getTable('config').' DROP action_mark_as_read');
}
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
*/
public function up(Schema $schema)
{
- $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')");
- $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
+ $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('share_unmark', 0, 'entry')");
+ $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')");
}
/**
*/
public function down(Schema $schema)
{
- $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';");
- $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';");
+ $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'share_unmark';");
+ $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'unmark_url';");
}
}
*/
public function down(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() != 'sqlite', 'This down migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
$this->addSql('ALTER TABLE '.$this->getTable('entry').' DROP http_status');
}
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
- * Add the restricted_access internal setting for articles with paywall
+ * Add the restricted_access internal setting for articles with paywall.
*/
class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface
{
private function getTable($tableName)
{
- return $this->container->getParameter('database_table_prefix') . $tableName;
+ return $this->container->getParameter('database_table_prefix').$tableName;
}
/**
*/
public function up(Schema $schema)
{
- $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
+ $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
}
/**
*/
public function down(Schema $schema)
{
- $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
+ $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
}
}
*/
public function up(Schema $schema)
{
- $this->abortIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
+ $this->skipIf($this->connection->getDatabasePlatform()->getName() === 'sqlite', 'This up migration can\'t be executed on SQLite databases, because SQLite don\'t support DROP COLUMN.');
$this->skipIf(false === $schema->getTable($this->getTable('user'))->hasColumn('expired'), 'It seems that you already played this migration.');