![]() |
Spark Migrate on Testing environment - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Spark Migrate on Testing environment (/showthread.php?tid=75608) |
Spark Migrate on Testing environment - akuila - 02-25-2020 Hi, I just want to start learning the CI4. Within .env file, there was 2 template group of Database, default and tests. CMIIW, default group will be used if i set CI_ENVIRONMENT to production. if i want to use tests group, than i have to set CI_ENVIRONMENT to development or testing ? my question actually about spark migration. If i set the environment to production / development, and run php spak migration, it was no error, and the default database filed with migration data. But if i change the environment to testing, i got this error: Code: CodeIgniter CLI Tool - Version 4.0.2 - Server-Time: 2020-02-25 22:24:35pm Please advise, how do i use the tests group database during migration? Thank you. RE: Spark Migrate on Testing environment - midav - 02-26-2020 (02-25-2020, 09:25 PM)akuila Wrote: Hi,no, if you have specified the theta data for the database, then you need to specify testing in ENVIRONMENT and then default will not be connected here in app / Config / Database.php there is a check http://prntscr.com/r806jx if specified in .env default and tests testing will work if it stands in CI_ENVIRONMENT = testing RE: Spark Migrate on Testing environment - akuila - 02-26-2020 (02-26-2020, 07:52 AM)midav Wrote: no, if you have specified the theta data for the database, then you need to specify testing in ENVIRONMENT and then default will not be connected Yes, i was aware about http://prntscr.com/r806jx Like i mention above, when i set the CI_ENVIRONMENT to testing I can't do "php spark migrate" |