CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

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

Open ytetsuro opened this issue 4 years ago • 4 comments

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

ytetsuro avatar Sep 07 '21 00:09 ytetsuro

I'm not sure.

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

kenjis avatar Sep 21 '21 06:09 kenjis

@kenjis

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

ytetsuro avatar Sep 23 '21 09:09 ytetsuro

@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 avatar Sep 25 '21 01:09 ytetsuro

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

  • Align it to ANSI SQL or SQL standard.
  • Allow each driver to absorb as much of the ANSI SQL and SQL standard as possible with CodeIgniter\Database\Forge::_attributeType.
  • Remove non-standard SQL queries from tests.

ytetsuro avatar Sep 25 '21 10:09 ytetsuro