Welcome Guest, Not a member yet? Register   Sign In
Run migrations after spark command
#1

(This post was last modified: 04-16-2023, 11:58 AM by sjender.)

I have a setup spark command that sets the contents of the .env file for the user. One of these things is setting up DB settings. Within this same command I want to run migrations to setup the database as well. But since the .env was populated during the command, I can not use them yet to initiate the migrations.... Is it possible to:

1) Run the migrations command after the spark command finishes
OrĀ 
2) reload the .env so I can migrate within the command.
Or
3) set the db credentials in another way to be able to run a migration.

Key is that I dont want to bother my users by having to use a second command. I want this to be all in one command.
Reply
#2

A simple putenv() did the trick. Sometimes it's just that simple...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB