Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite data types #11663

Merged
merged 3 commits into from
Apr 13, 2016
Merged

Sqlite data types #11663

merged 3 commits into from
Apr 13, 2016

Conversation

basilfx
Copy link
Contributor

@basilfx basilfx commented Apr 13, 2016

The lists of column types has been extended. However, not all column types conversions exist for SQLite.

This PR adds support for the additional column types. While SQLite has no statically typed columns, they have dynamic typing and use the column name for determining the type affinity. The rules are explained in Section 2.0. I have chosen column names that match MySQL the most, while still adhering to the type affinity rules. This way, as little as possible information is lost when converting from SQLite to another DBMS.

I also extended the dialect tests.

Together with phalcon/phalcon-devtools#639, I have been using this patch for almost two weeks without problems. I successfully converted from MySQL -> Phalcon Devtool Migrations -> SQLite (clean migration).

basilfx added 2 commits April 13, 2016 12:52
SQLite does not enforce static data types, but follows type affinity
conventions. The rules are explained here:
www.sqlite.org/datatype3.html. The column data types chosen maximize
database compatibility.
@sergeyklay
Copy link
Contributor

Could you please update CHANGELOG.md

@basilfx basilfx force-pushed the sqlite-data-types branch from d7bc4cf to ba3fc2b Compare April 13, 2016 11:32
@basilfx
Copy link
Contributor Author

basilfx commented Apr 13, 2016

Adapted CHANGELOG.md.

@sergeyklay sergeyklay merged commit a8ef995 into phalcon:2.1.x Apr 13, 2016
@sergeyklay
Copy link
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants