Migrate database after installation if extension comes with database migrations.

This commit is contained in:
purple 2023-05-31 14:34:13 +02:00
parent c948cb4b2f
commit 09b037cb4e

View file

@ -358,6 +358,11 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
if [[ $author == "blueprint" ]]; then log_blue "Please refrain from setting the author variable to 'blueprint', thanks!";fi; if [[ $author == "blueprint" ]]; then log_blue "Please refrain from setting the author variable to 'blueprint', thanks!";fi;
if [[ $author == "Blueprint" ]]; then log_blue "Please refrain from setting the author variable to 'Blueprint', thanks!";fi; if [[ $author == "Blueprint" ]]; then log_blue "Please refrain from setting the author variable to 'Blueprint', thanks!";fi;
if [[ $migrations_enabled == "yes" ]]; then
log_bold "This extension comes with migrations. If you get prompted, answer 'yes'.\n";
php artisan migrate;
fi;
chmod -R +x .blueprint/.storage/extensiondata/$identifier/*; chmod -R +x .blueprint/.storage/extensiondata/$identifier/*;
if [[ $flags == *"-run.afterinstall;"* ]]; then if [[ $flags == *"-run.afterinstall;"* ]]; then