Created
June 7, 2018 20:10
-
-
Save BrechtBonte/d125fa7f8f5e9a4ba6e23433e8d249c1 to your computer and use it in GitHub Desktop.
Migrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Migration_000001_Bcrypt : MigrationInterface | |
{ | |
private $migrationManager; | |
public function up() : void | |
{ | |
if ($this->migrationManager->getSetting('passwordAlgorithm') !== null) { | |
return; | |
} | |
// fetch users and change password encoding | |
} | |
public function down() : void | |
{ | |
// nada | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MigrationInterface | |
{ | |
public function up() : void; | |
public function down() : void; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MigrationManagerInterface | |
{ | |
public function getSetting(string $name) : ?string; | |
public function setSetting(string $name, string $value) : void; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment