File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -868,6 +868,18 @@ private function auto_check_update() {
868868 */
869869 private function maybe_trigger_migration () {
870870
871+ $ cache = EE ::get_cache ();
872+
873+ /**
874+ * Below condition ensures that running EE::launch() or runcommand()
875+ * in migration file does not trigget migration again.
876+ */
877+ if ( $ cache ->read ('migration_running ' ) ) {
878+ return ;
879+ }
880+
881+ $ cache ->write ( 'migration_running ' , true );
882+
871883 $ db_version = Option::get ( 'version ' );
872884 $ current_version = EE_VERSION ;
873885
@@ -899,6 +911,8 @@ private function maybe_trigger_migration() {
899911 } elseif ( false !== strpos ( $ current_version , 'nightly ' ) ) {
900912 $ this ->trigger_migration ( $ current_version );
901913 }
914+
915+ $ cache ->remove ( 'migration_running ' );
902916 }
903917
904918 private function trigger_migration ( $ version ) {
You can’t perform that action at this time.
0 commit comments