Open elijahb opened 9 years ago
I'd rather go with additional attributes allowing you to overwrite the sqlType
for a particular platform. So like <column name="mode" type="VARCHAR" sqlType="enum('one','two')" sqlType-sqlite="TEXT" defaultValue="two"/>
. So sqlType being the default and all additional attributes overwrite the value for its platform. Guess that's the easiest way to bypass such use cases.
We use the sql:build option to export our MySQL intended schema to SQLite to perform some integration tests. We found that when exporting an schema that uses ENUM and UNSIGNED, the SqlitePlatform exports them, but they are invalid to SQLite.
As far as I can see it's because SqlitePlatform.php falls back to DefaultPlatform.php that includes the sqlType property. Maybe SqlitePlatform should filter invalid types, or maybe there should be a way to set that the schema is intended to one platform and if you export it to some other it should ignore the sqlType field at all (or maybe it could be an option in the command line to ingore it), or maybe SqlitePlatform should ignore sqlType at all since it supports only a few types.
Schema column example:
sql:build --platform sqlite
Should be exported as