Migration on group and namespace |
Hi,
I'm trying to run a migration to my maindb group from my modules folder, to do this i've been reading the migration what command to use. This doesn't seem to be working and i'm wondering if it's something wrong on my side or someone has the same issue, below the coding for this and command i've used. PHP Code: <?php Code: php spark migrate -g maindb -n Modules Did someone encountered this issue or is it just me?
I see this problem too you need use - - namespace instead of - n
It s work for me
Enlightenment Is Freedom
Hi paliz!
thank you for your answer, did try your solution but it's looking for APPPATH and that's not my directory structure. My modules folder is outside of the app root, it doesn't return any errors when i use the userguide commands but nothing happens inside the query.
If you want to know how to do this download Boilerplate by user @agungsugiarto
Look at the folder Commands InstallCommand.php and PublishCommand.php He is re-writing the namespace form the module to the App Path. Download: CodeIgniter 4 Application Boilerplate What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I'll look into it and get back to you in a short.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-08-2021, 01:22 AM)InsiteFX Wrote: If you want to know how to do this download Boilerplate by user @agungsugiarto I also had to write custom spark conmmand because it was not possible to run migrations this way: Code: migrate -g mygroup -n mynamespace I was getting an error: Code: Unable to connect to the database.
If you change the folder paths then you need to edit the spark file and change the path in it also.
Spark points to the public folder in the root. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
It is not very convenient to customize the default spark file in the root of the site in the case of using modules. But that's just my opinion.
Therefore, I chose the option of adding custom command to the module itself. |
Welcome Guest, Not a member yet? Register Sign In |