update migrations
This commit is contained in:
parent
24135e0982
commit
258a754788
2 changed files with 22 additions and 42 deletions
|
@ -2,43 +2,33 @@
|
|||
|
||||
namespace Neos\Flow\Persistence\Doctrine\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Exception as DoctrineDBALException;
|
||||
use Doctrine\DBAL\Migrations\AbortMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs! This block will be used as the migration description if getDescription() is not used.
|
||||
*/
|
||||
class Version20140505093853 extends AbstractMigration
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
* @return void
|
||||
* @throws AbortMigrationException
|
||||
* @throws DoctrineDBALException
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is autogenerated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
|
||||
$this->addSql('CREATE TABLE digicomp_sequence_domain_model_insert (number INT NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(number, type))');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
* @return void
|
||||
* @throws AbortMigrationException
|
||||
* @throws DoctrineDBALException
|
||||
*/
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is autogenerated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
|
||||
$this->addSql('DROP TABLE digicomp_sequence_domain_model_insert');
|
||||
}
|
||||
|
|
|
@ -2,43 +2,33 @@
|
|||
|
||||
namespace Neos\Flow\Persistence\Doctrine\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Exception as DoctrineDBALException;
|
||||
use Doctrine\DBAL\Migrations\AbortMigrationException;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs! This block will be used as the migration description if getDescription() is not used.
|
||||
*/
|
||||
class Version20160624203903 extends AbstractMigration
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
* @return void
|
||||
* @throws AbortMigrationException
|
||||
* @throws DoctrineDBALException
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is autogenerated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
|
||||
$this->addSql('CREATE INDEX type_idx ON digicomp_sequence_domain_model_insert (type)');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
* @return void
|
||||
* @throws AbortMigrationException
|
||||
* @throws DoctrineDBALException
|
||||
*/
|
||||
public function down(Schema $schema)
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is autogenerated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on "mysql".');
|
||||
|
||||
$this->addSql('DROP INDEX type_idx ON digicomp_sequence_domain_model_insert');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue