Skip to content

Instantly share code, notes, and snippets.

@evgeniy1204
Created September 4, 2017 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evgeniy1204/99999ebd7b3229382eafececb47075e7 to your computer and use it in GitHub Desktop.
Save evgeniy1204/99999ebd7b3229382eafececb47075e7 to your computer and use it in GitHub Desktop.
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170904175832 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('INSERT INTO settings (id, title, setting_key, value) VALUES (NULL, \'Telegram url\', \'social_telegram_link\', NULL)');
$this->addSql('INSERT INTO settings (id, title, setting_key, value) VALUES (NULL, \'Viber url\', \'social_viber_link\', NULL)');
$this->addSql('INSERT INTO settings (id, title, setting_key, value) VALUES (NULL, \'Instagram url\', \'social_inst_link\', NULL)');
$this->addSql('INSERT INTO settings (id, title, setting_key, value) VALUES (NULL, \'Youtube url\', \'social_yo_link\', NULL)');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment