cycle / orm

PHP DataMapper, ORM
https://cycle-orm.dev
MIT License
1.23k stars 71 forks source link

💡 Add documentation for migration generation / drivers #492

Open theilm opened 1 month ago

theilm commented 1 month ago

When generating migrations, the generated migration code depends on the driver that is currently used. This might lead to problems when using the migration with another driver later on.

Specifically, we encountered a problem when we generated migrations with MySQL driver. The "size" property was added to primary / integer columns. This lead to problems when executing the migration with SQLite driver. When removing the "size" property, the migration worked fine with SQLite.

Should we add documentation regarding this behavior? Should we add suggestions what driver to use for generating migrations in order to ensure compatibility with most drivers / which properties to remove?

wolfy-j commented 1 month ago

Any PRs will be welcome.