Skip to content

Commit 794aeea

Browse files
committed
TASK: Migrations for Flow/Neos 7
1 parent 28ad554 commit 794aeea

File tree

4 files changed

+11
-46
lines changed

4 files changed

+11
-46
lines changed

Migrations/Mysql/Version20190208083758.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,24 @@
1010
class Version20190208083758 extends AbstractMigration
1111
{
1212

13-
/**
14-
* @return string
15-
*/
16-
public function getDescription()
13+
public function getDescription(): string
1714
{
1815
return '';
1916
}
2017

21-
/**
22-
* @param Schema $schema
23-
* @return void
24-
*/
25-
public function up(Schema $schema)
18+
public function up(Schema $schema): void
2619
{
2720
// this up() migration is autogenerated, please modify it to your needs
2821
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
29-
22+
3023
$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');
3124
}
3225

33-
/**
34-
* @param Schema $schema
35-
* @return void
36-
*/
37-
public function down(Schema $schema)
26+
public function down(Schema $schema): void
3827
{
3928
// this down() migration is autogenerated, please modify it to your needs
4029
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
41-
30+
4231
$this->addSql('DROP TABLE sandstorm_neosacl_domain_model_dynamicrole');
4332
}
4433
}

Migrations/Mysql/Version20190209183400.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,24 @@
1010
class Version20190209183400 extends AbstractMigration
1111
{
1212

13-
/**
14-
* @return string
15-
*/
16-
public function getDescription()
13+
public function getDescription(): string
1714
{
1815
return '';
1916
}
2017

21-
/**
22-
* @param Schema $schema
23-
* @return void
24-
*/
25-
public function up(Schema $schema)
18+
public function up(Schema $schema): void
2619
{
2720
// this up() migration is autogenerated, please modify it to your needs
2821
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
29-
22+
3023
$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)\'');
3124
}
3225

33-
/**
34-
* @param Schema $schema
35-
* @return void
36-
*/
37-
public function down(Schema $schema)
26+
public function down(Schema $schema): void
3827
{
3928
// this down() migration is autogenerated, please modify it to your needs
4029
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');
41-
30+
4231
$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)\'');
4332
}
4433
}

Migrations/Mysql/Version20191030210312.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@
1111
class Version20191030210312 extends AbstractMigration
1212
{
1313

14-
/**
15-
* @return string
16-
*/
1714
public function getDescription(): string
1815
{
1916
return '';
2017
}
2118

22-
/**
23-
* @param Schema $schema
24-
* @return void
25-
* @throws AbortMigrationException
26-
*/
2719
public function up(Schema $schema): void
2820
{
2921
// this up() migration is autogenerated, please modify it to your needs
@@ -32,11 +24,6 @@ public function up(Schema $schema): void
3224
$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)\'');
3325
}
3426

35-
/**
36-
* @param Schema $schema
37-
* @return void
38-
* @throws AbortMigrationException
39-
*/
4027
public function down(Schema $schema): void
4128
{
4229
// this down() migration is autogenerated, please modify it to your needs

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "neos-package",
44
"name": "sandstorm/neosacl",
55
"require": {
6-
"neos/flow": "^4.0 || ^5.0 || ^6.0",
6+
"neos/flow": "^7.0 || dev-master",
77
"neos/fusion-afx": "*"
88
},
99
"autoload": {

0 commit comments

Comments
 (0)