Centralized permission updated message for migrations.

This commit is contained in:
Jan Böhmer 2020-06-14 21:17:57 +02:00
parent 74e4c4d0d1
commit 00689b35ce
4 changed files with 17 additions and 3 deletions

View file

@ -11,6 +11,8 @@ use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
abstract class AbstractMultiPlatformMigration extends AbstractMigration
{
protected $permissions_updated = false;
public function up(Schema $schema): void
{
$db_type = $this->connection->getDatabasePlatform()->getName();
@ -70,6 +72,18 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
return '$2y$10$36AnqCBS.YnHlVdM4UQ0oOCV7BjU7NmE0qnAVEex65AyZw1cbcEjq';
}
public function printPermissionUpdateMessage(): void
{
$this->permissions_updated = true;
//$this->write('<question>[!!!] Permissions were updated! Please check if they fit your expectations!</question>');
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
$this->write('<question>[!!!] Permissions were updated! Please check if they fit your expectations!</question>');
}
abstract public function mySQLUp(Schema $schema): void;
abstract public function mySQLDown(Schema $schema): void;