codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.36k stars 1.9k forks source link

To what extent is CodeIgniter\Database\Forge::_attributeType intended to absorb differences? #5059

Open ytetsuro opened 3 years ago

ytetsuro commented 3 years ago

What does CodeIgniter\Database\Forge::_attributeType change the type based on? (ANSI SQL?).

Why does the following test code unset a type that cannot be used? https://github.com/codeigniter4/CodeIgniter4/blob/develop/tests/_support/Database/Migrations/20160428212500_Create_test_tables.php#L75-L94

kenjis commented 3 years ago

I'm not sure.

But it seems CodeIgniter\Database\Forge::_attributeType() is based on MySQL data types. Because MySQLi\Forge has no _attributeType().

ytetsuro commented 3 years ago

@kenjis

Response very thanks. I figured out that it is based on MySQL.

ytetsuro commented 3 years ago

@paulbalandan

Why close? Are you saying that it is wrong to ask this question in an issue? To what extent is CodeIgniter\Database\Forge::_attributeType intended to absorb differences? Why does the following test code unset a type that cannot be used? https://github.com/codeigniter4/CodeIgniter4/blob/develop/tests/_support/Database/Migrations/20160428212500_Create_test_tables.php#L75-L94

ytetsuro commented 3 years ago

If I modify this as follows, does CodeIgniter need it?