mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-07-22 05:31:58 -04:00
refactor(pterodactyl):✨ Remove manual migration step (#76)
Remove the run_migrations function from the startup script as database migrations are now handled automatically by the application during initialization, simplifying the startup process and reducing redundant operations.
This commit is contained in:
@@ -18,15 +18,6 @@ generate_key() {
|
||||
log "Key generated successfully."
|
||||
}
|
||||
|
||||
run_migrations() {
|
||||
log "Running database migrations..."
|
||||
if ! docker exec -i $CONTAINER_ID php artisan migrate --force; then
|
||||
log "ERROR: Database migrations failed. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
log "Database migrations completed successfully."
|
||||
}
|
||||
|
||||
optimize_cache() {
|
||||
log "Optimizing Laravel cache..."
|
||||
if ! docker exec -i $CONTAINER_ID php artisan optimize; then
|
||||
@@ -53,7 +44,6 @@ create_user() {
|
||||
main() {
|
||||
log "Starting script..."
|
||||
generate_key
|
||||
run_migrations
|
||||
optimize_cache
|
||||
prompt_check_login
|
||||
create_user
|
||||
|
||||
Reference in New Issue
Block a user