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{v—AX%_RxV#Nj rf]>L~DqDl$CsSQPkJߣgdS.ٸ` Nh8g *L,N 2md5GunJo@(c']=y [lD]w~TL8g8ٴ9ͻ @-&$ƪ6lMWf 05LepHqtM;qd͗ͬR]i,ZOL070U Ρa'\'dqs!ۇYOhrqQk6NxpV3mT$ѷ? a~__bm5 9Nf3bfbh|U=RK HkW V",; nc7Ħ +ƵF0I1맬ӷbe2' ?m%ZLYJw3n@PGt5PyH&{5,]NM~ɵfi-}@1cl͟UpY/1A-a38qnlOLy\(\iɶ`Vګ_REnsure entities have been loaded $output->writeln(" [-] Comparing the $db_name database schema with the current mapping metadata."); try { // Get the current database migration version $currentMigrationVersion = $this->getLatestMigrationVersion(new BufferedOutput()); // Version migrations $process = new Process('bin/console doctrine:migrations:version --add --all --no-interaction'); $process->setWorkingDirectory($this->projectDirectory); $process->run(); // Compare the current database migration version against database and create a new migration version accordingly. $process = new Process('bin/console doctrine:migrations:diff --quiet'); $process->setWorkingDirectory($this->projectDirectory); $process->mustRun(); $process = new Process('bin/console doctrine:migrations:status --quiet'); $process->setWorkingDirectory($this->projectDirectory); $process->run(); // Get the latest database migration version $latestMigrationVersion = $this->getLatestMigrationVersion(new BufferedOutput()); if ($currentMigrationVersion != $latestMigrationVersion) { $output->writeln(" [!] The current database schema is not up-to-date with the current mapping metadata."); $interactiveQuestion = new Question("\n Update your database schema to the current mapping metadata? [Y/N] ", 'Y'); if ('Y' === strtoupper($this->questionHelper->ask($input, $output, $interactiveQuestion))) { $output->writeln([ "", " Please wait while your database is being migrated from version $currentMigrationVersion to $latestMigrationVersion.", " This could take up to a few minutes.\n", ]); try { // Migrate database to latest schematic version $process = new Process('bin/console doctrine:migrations:migrate --no-interaction --quiet'); $process->setTimeout(900); $process->setWorkingDirectory($this->projectDirectory); $process->mustRun(); // Load database fixtures to populate initial dataset $process = new Process('bin/console doctrine:fixtures:load --append'); $process->setTimeout(120); $process->setWorkingDirectory($this->projectDirectory); $process->mustRun(); $output->writeln(" [v] Database successfully migrated to the latest migration version $latestMigrationVersion to $latestMigrationVersion.\n"); } catch (\Exception $e) { $output->writeln([ "\n [x] Unable to successfully migrate to latest database schematic version.", "\n Exiting evaluation process.\n" ]); return 1; } } else { $output->writeln([ "\n [x] There are entities that have not been updated to the $databaseName database yet.", "\n Exiting evaluation process.\n" ]); return 1; } } else { $output->writeln([ "\n [x] Unable to correctly determine database schema version.", "\n Exiting evaluation process.\n" ]); return 1; } } catch (\Exception $e) { // Database is up-to-date. Do nothing. $output->writeln(" [v] The current database schema is up-to-date with the current mapping metdata.\n"); } // Check 3: Check if super admin account exists $output->writeln(" [-] Checking if an active super admin account exists"); $database = new \PDO("mysql:host=$db_host:$db_port;dbname=$db_name", $db_user, $db_password); $supportRoleQuery = $database->query("SELECT * FROM uv_support_role WHERE code = 'ROLE_SUPER_ADMIN'"); $supportRole = $supportRoleQuery->fetch(\PDO::FETCH_ASSOC); $userInstanceQuery = $database->query("SELECT * FROM uv_user_instance WHERE supportRole_id = " . $supportRole['id']); $userInstance = $userInstanceQuery->fetch(\PDO::FETCH_ASSOC); if (empty($userInstance)) { $output->writeln(" [!] No active user account found with super admin privileges."); $interactiveQuestion = new Question("\n Create a new user account with super admin privileges? [Y/N] ", 'Y'); if ('Y' === strtoupper($this->questionHelper->ask($input, $output, $interactiveQuestion))) { $output->write(["\033[1A", "\033[K", "\033[1A", "\033[K"]); $output->writeln("\n Please enter the following details:\n"); $warningFlag = false; do { $u_email = $this->askInteractiveQuestion("Email: ", null, 6, false, false, "Please enter a valid email address"); $u_email = filter_var($u_email, FILTER_SANITIZE_EMAIL); if ($warningFlag) { $output->write([self::MCA, self::CLL]); } if (false == filter_var($u_email, FILTER_VALIDATE_EMAIL)) { $output->writeln(" Warning: $u_email is not a valid email address"); $warningFlag = true; } } while (false == filter_var($u_email, FILTER_VALIDATE_EMAIL)); $u_name = $this->askInteractiveQuestion("Name: ", null, 6, false, false, "Please enter your name"); $warningFlag = false; do { $u_password = $this->askInteractiveQuestion("Password: ", null, 6, false, true, "Please enter your password"); $u_cpassword = $this->askInteractiveQuestion("Confirm Password: ", null, 6, false, true, "Please enter your password"); if ($warningFlag) { $output->write([self::MCA, self::CLL]); } if ($u_password != $u_cpassword) { $output->writeln(" Warning: Passwords do not match"); $warningFlag = true; } } while ($u_password != $u_cpassword); $output->write([self::MCA, self::CLL, self::MCA, self::CLL, self::MCA, self::CLL]); try { $process = new Process(sprintf("bin/console %s %s '%s' %s %s --no-interaction", 'uvdesk_wizard:defaults:create-user', 'ROLE_SUPER_ADMIN', trim($u_name), $u_email, $u_password )); $process->setWorkingDirectory($this->projectDirectory); $process->mustRun(); $output->writeln(" [v] User account created successfully.\n"); } catch (ProcessFailedException $e) { // Do nothing ... $output->writeln([ " [x] An unexpected error occurred while creating the user account.\n", "\n Exiting evaluation process.\n" ]); return 1; } } else { $output->writeln("\n [!] Skipping creatK|>Ne&7+;S51"A_fB~aP{|\7=kR*Hnۚi$cXbΨOEX vnžp0gl1;mkjEC.|Nk09$TeOң﹞] 쨅$jpT"@T>: R;_t&ˎ̻L)ZTFͫf K^ĶzL_w5=&A#-_lq *'m_Z 6qPҥkKݿKۆk#~x ^/eoSqN=B. ϡ;|):0mD-1 R*"^4Xl)A= 9CK%Wu!(˒QܹT7։3ϻbcb[B&ug?0YӭfPUE10 ϘD9fE|w@)NY_:}܄tz}*(6cCɸ; w.rjt#\v$$ QMxS=s!ď(#A3.7't;z5D.Yv #۴lުgUytͤ((3 lq%f1)HNd_*> $ MFM*ۢx"Hfj>څ5,/JBŒovi̔{cpsOmSYa;~ʫ@?D >\Mueܤ%" kpVo%E_;h^F9Q7eY/ٰ)UQOƤNޛ콝ۖ{zKֻYld*)XH7u!OiҨ19aC<9qb`iXNjRt K_!}O )a^E$ /wPvٔۊ7%Uz%>Kt7Z< ]6!2z)Pl \@JiG?j j)^0[|OST3WdJb-6}δO>{*r{ /= :wY}Cui<&S}`%IbV. *7k3d@T)7 j%K|r̾2gTTDU2V=}\we@@)췀9)iw*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