Closed wrongecho closed 1 week ago
You cannot use hyphens, because My-first-migration
is an invalid classname.
See https://codeigniter4.github.io/CodeIgniter4/dbmgmt/migration.html#migration-file-names
The following command is invalid. Because the usage is php spark make:migration <class> [options]
.
my-first-migration
is not a valid classname.
PS C:\wamp64\www\codeigniter> php spark make:migration my-first-migration
See https://codeigniter4.github.io/CodeIgniter4/dbmgmt/migration.html#make-migration
I sent PR #9179
PHP Version
8.2
CodeIgniter4 Version
4.5.5
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MariaDB 11.3.2
What happened?
Migration files created with
php spark make:migration
fail to be detected bymigrate:status
if hyphens (-
) are used in the name.Steps to Reproduce
PS C:\wamp64\www\codeigniter> php spark make:migration my-first-migration
PS C:\wamp64\www\codeigniter> php spark migrate:status
Expected Output
PS C:\wamp64\www\codeigniter> php spark make:migration my_first_migration
PS C:\wamp64\www\codeigniter> php spark migrate:status
Anything else?
Please accept my apologies if this was previously reported, or if I am doing something incorrectly. I am new to CodeIgniter and this caused me a lot of grief when following the docs at https://codeigniter.com/user_guide/dbmgmt/forge.html
Thank you for your time :)