Skip to content
Snippets Groups Projects

is needed

Merged Bartek Jaskulski requested to merge is-needed into main
1 unresolved thread
2 files
+ 14
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 8
1
@@ -20,5 +20,12 @@ abstract class AbstractMigration {
abstract public function up(): bool;
public function down(): void {}
/**
* Allow to skip migration if it is not needed. Tracking of migration version just by wp_options
* value may be subject to random issues, so as a backup, this method can be used to avoid
* errornous migrations like creating alredy exising columns.
*/
public function is_needed(): bool {
return true;
}
}
Loading