due to our enivronment I'm trying to recreate the php artisan database:fresh
command.
As part of this I need to recreate our dev database and testing database. I can recreate the testing database fine by specifying the connection however I cannot do the same for my dev database (the current database I'm connected to).
If I run this on my testing database
Schema::getConnection()->getDoctrineSchemaManager()->dropAndCreateDatabase("testing");
DB::connection($connectionName)->unprepared($this->sqlFile);
Everything works however if I run that on the database I am currently connected to:
Schema::getConnection()->getDoctrineSchemaManager()->dropAndCreateDatabase("app");
DB::unprepared($this->sqlFile);
The second line will not run.
I have tried specifying the currently connected database and it does not work.
What can I do to rebuild the current database for the database I am currently connected to?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire