diff --git a/src/cooldogedev/BedrockEconomy/database/constant/MigrationVersion.php b/src/cooldogedev/BedrockEconomy/database/constant/MigrationVersion.php new file mode 100644 index 0000000..0dbf3e9 --- /dev/null +++ b/src/cooldogedev/BedrockEconomy/database/constant/MigrationVersion.php @@ -0,0 +1,36 @@ +getMin(), ">=")) { + $min = $migration->getMin(); + $max = $migration->getMax(); + + if ($min !== MigrationVersion::VERSION_ANY && !version_compare($version, $min, ">=")) { continue; } - if (!version_compare($version, $migration->getMax(), "<=")) { + if ($max !== MigrationVersion::VERSION_ANY && !version_compare($version, $max, "<=")) { continue; } diff --git a/src/cooldogedev/BedrockEconomy/database/migration/economyapi/Migration.php b/src/cooldogedev/BedrockEconomy/database/migration/economyapi/Migration.php index 6649654..2c996a6 100644 --- a/src/cooldogedev/BedrockEconomy/database/migration/economyapi/Migration.php +++ b/src/cooldogedev/BedrockEconomy/database/migration/economyapi/Migration.php @@ -32,6 +32,7 @@ use cooldogedev\BedrockEconomy\api\BedrockEconomyAPI; use cooldogedev\BedrockEconomy\BedrockEconomy; +use cooldogedev\BedrockEconomy\database\constant\MigrationVersion; use cooldogedev\BedrockEconomy\database\migration\IMigration; use Generator; use SOFe\AwaitGenerator\Await; @@ -45,12 +46,12 @@ public function getName(): string public function getMin(): string { - return "0.0.1"; + return MigrationVersion::VERSION_ANY; } public function getMax(): string { - return "0.0.1"; + return MigrationVersion::VERSION_ANY; } public function run(string $mode): bool