Skip to content

Commit

Permalink
TASK: Migrations for Flow/Neos 7
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Jan 6, 2021
1 parent 28ad554 commit 794aeea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 46 deletions.
21 changes: 5 additions & 16 deletions Migrations/Mysql/Version20190208083758.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,24 @@
class Version20190208083758 extends AbstractMigration
{

/**
* @return string
*/
public function getDescription()
public function getDescription(): string
{
return '';
}

/**
* @param Schema $schema
* @return void
*/
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->addSql('CREATE TABLE sandstorm_neosacl_domain_model_dynamicrole (persistence_object_identifier VARCHAR(40) NOT NULL, name VARCHAR(255) NOT NULL, abstract TINYINT(1) NOT NULL, parentrolenames LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', privileges LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', PRIMARY KEY(persistence_object_identifier)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
}

/**
* @param Schema $schema
* @return void
*/
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->addSql('DROP TABLE sandstorm_neosacl_domain_model_dynamicrole');
}
}
21 changes: 5 additions & 16 deletions Migrations/Mysql/Version20190209183400.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,24 @@
class Version20190209183400 extends AbstractMigration
{

/**
* @return string
*/
public function getDescription()
public function getDescription(): string
{
return '';
}

/**
* @param Schema $schema
* @return void
*/
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->addSql('ALTER TABLE sandstorm_neosacl_domain_model_dynamicrole CHANGE parentrolenames parentrolenames LONGTEXT NOT NULL COMMENT \'(DC2Type:flow_json_array)\', CHANGE privileges privileges LONGTEXT NOT NULL COMMENT \'(DC2Type:flow_json_array)\'');
}

/**
* @param Schema $schema
* @return void
*/
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->addSql('ALTER TABLE sandstorm_neosacl_domain_model_dynamicrole CHANGE parentrolenames parentrolenames LONGTEXT NOT NULL COLLATE utf8mb4_unicode_ci COMMENT \'(DC2Type:array)\', CHANGE privileges privileges LONGTEXT NOT NULL COLLATE utf8mb4_unicode_ci COMMENT \'(DC2Type:array)\'');
}
}
13 changes: 0 additions & 13 deletions Migrations/Mysql/Version20191030210312.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,11 @@
class Version20191030210312 extends AbstractMigration
{

/**
* @return string
*/
public function getDescription(): string
{
return '';
}

/**
* @param Schema $schema
* @return void
* @throws AbortMigrationException
*/
public function up(Schema $schema): void
{
// this up() migration is autogenerated, please modify it to your needs
Expand All @@ -32,11 +24,6 @@ public function up(Schema $schema): void
$this->addSql('ALTER TABLE sandstorm_neosacl_domain_model_dynamicrole ADD privilege VARCHAR(255) NOT NULL, CHANGE privileges matcher LONGTEXT NOT NULL COMMENT \'(DC2Type:flow_json_array)\'');
}

/**
* @param Schema $schema
* @return void
* @throws AbortMigrationException
*/
public function down(Schema $schema): void
{
// this down() migration is autogenerated, please modify it to your needs
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "neos-package",
"name": "sandstorm/neosacl",
"require": {
"neos/flow": "^4.0 || ^5.0 || ^6.0",
"neos/flow": "^7.0 || dev-master",

This comment has been minimized.

Copy link
@paavo

paavo Jul 20, 2021

Is there a reason Flow 4 / 5 / 6 is not supported anymore?

Otherwise i would propose to use:
"neos/flow": "^4.0 || ^5.0 || ^6.0 || ^7.0",

"neos/fusion-afx": "*"
},
"autoload": {
Expand Down

0 comments on commit 794aeea

Please sign in to comment.