Page 1 of 1

Unsupported data types by migrations - umil

Posted: Sat Dec 02, 2017 2:27 pm
by shaim
Hi all,
I'd like to use the update_schema() method to update table structure, but regretfully, supported data types do not include set, enum, or date types - as supported in mysql.

Will that be acceptable for when the extension is reviewed - if I run an "alter table" sql statement using $db->sql_query()?

Or is there any other way it should be done?

Thanks!

Re: Unsupported data types by migrations - umil

Posted: Sat Dec 02, 2017 2:51 pm
by david63
shaim wrote:
Sat Dec 02, 2017 2:27 pm
Will that be acceptable for when the extension is reviewed - if I run an "alter table" sql statement using $db->sql_query()?
It is highly unlikely that a non supported data type would be accepted for an extension submitted to the CDB.

I believe the reason why some MySql data types are not supported is because other supported database types do not allow them and any extension in the CDB has to be compatible with all database types.

There could be extenuating circumstances (for example if the extension related specifically to MySql) but they would be pretty rare.

Re: Unsupported data types by migrations - umil

Posted: Sat Dec 02, 2017 2:59 pm
by 3Di
You can crete a your own specified data type within a migration though , like this one
viewtopic.php?f=461&t=2398036&hilit=dat ... t&start=15

Thw full topic from which belongs the above link is worth reading, btw.

Re: Unsupported data types by migrations - umil

Posted: Sat Dec 09, 2017 4:52 pm
by shaim
thanks!! :-)

Re: Unsupported data types by migrations - umil

Posted: Sat Dec 09, 2017 4:54 pm
by 3Di
Have fun :)