update migrations

This commit is contained in:
Robin Krahnen 2021-09-08 16:42:05 +02:00
parent 24135e0982
commit 258a754788
2 changed files with 22 additions and 42 deletions

View file

@ -2,43 +2,33 @@
namespace Neos\Flow\Persistence\Doctrine\Migrations; 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\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 class Version20140505093853 extends AbstractMigration
{ {
/**
* @return string
*/
public function getDescription()
{
return '';
}
/** /**
* @param Schema $schema * @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))'); $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 * @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'); $this->addSql('DROP TABLE digicomp_sequence_domain_model_insert');
} }

View file

@ -2,43 +2,33 @@
namespace Neos\Flow\Persistence\Doctrine\Migrations; 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\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 class Version20160624203903 extends AbstractMigration
{ {
/**
* @return string
*/
public function getDescription()
{
return '';
}
/** /**
* @param Schema $schema * @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)'); $this->addSql('CREATE INDEX type_idx ON digicomp_sequence_domain_model_insert (type)');
} }
/** /**
* @param Schema $schema * @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'); $this->addSql('DROP INDEX type_idx ON digicomp_sequence_domain_model_insert');
} }