Migration runs successfully but not creating tables |
Hi everyone,
I'm having problem with migration, migration runs successfully on CLI but it doesn't create any table except migration table which contains migration related detail. Any help? pls find the images below: ![]() ![]() ![]()
I'm not sure on this one but I believe you need to add all the fields with addKey.
All the migrations that I have seen do it this way, see below. PHP Code: /* What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(12-01-2020, 01:24 PM)InsiteFX Wrote: I'm not sure on this one but I believe you need to add all the fields with addKey. Thanks for the reply, i got the solution. the problem is that when you run migration, codeigniter does not generate any exception if there is any issue in your migration class, it silently says "Done" and does not create table in DB based on your schema. This behavior makes the developer clueless. This need to be addressed by codeigniter developers team. the problem was that i had declared "email" field unique twice one in field's array and other is via addUniqueKey() function and also i had not specified DBGroup variable as protected $DBGroup = 'default';
You can report it as an issue here:
CodeIgniter 4 Development If you on the top toolbar you will see the issue button. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |