Certain migration timestamp formats not working |
Hi there.
On my GNU/Linux machine I have installed XAMPP 8.1.12 and a fresh Composer installation of CodeIgniter 4.2.11 (both latest to this moment). I am successfully connected to the database. There is a timestamp format setting in app/Config/Migrations.php . The default setting works fine: PHP Code: public $timestampFormat = 'Y-m-d-His_'; If I change the format in a way that "His" have characters between the letters, it will not find any migration: PHP Code: public $timestampFormat = 'Y-m-d-H-i-s_'; Could anyone confirm this bug? I am pretty sure it is not a feature.
It might be a bug, but seems a specification.
In short, migration only supports filenames with regex /^\d{4}[_-]?\d{2}[_-]?\d{2}[_-]?\d{6}_(\w+)$/. See https://codeigniter4.github.io/CodeIgnit...file-names It does not say that the migration supports filename like Y-m-d-H-i-s_. By the way, why do you want to change the filename format like that?
Looks like conflict a internal validation and public property for custom format.
The doc comment is not good.
I sent a PR to fix it. https://github.com/codeigniter4/CodeIgniter4/pull/7033
I do not want to create new topic just for this. Used CodeIgniter 4.3.1 and PHP 8.2.0 through XAMPP.
I ran following commands: Code: composer create-project codeigniter4/appstarter test The last command output: Code: CodeIgniter v4.3.1 Command Line Tool - Server Time: 2023-02-02 15:39:50 UTC+00:00 The problem is, that the database is not connected. An output does not tell anything about it. |
Welcome Guest, Not a member yet? Register Sign In |