-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update to Ecto 3 #44
base: master
Are you sure you want to change the base?
Update to Ecto 3 #44
Conversation
I have a strategy for fixing the type issues. Handled using an Agent that stores the table column types. The types are fetched using The way decimals and numerics are handled may need to change. Ecto doesn't seem to like the way they are converted to integers when when precision < 10 and scale = 0 It seems that lists are not accepted as param at the moment. Next week I will start working on getting the TravisCI stuff working again. |
I like the Agent idea. I remember we decided against querying the database separately to get the types when we first built this although I can't say I remember why maybe we just figured we didn't need it. A lot of the type strangeness is workarounds because we had no way of knowing what the database types were so you might be able to simplify it a lot with a 1-to-1 mapping of MSSQL types to Elixir types. |
04a5b65
to
71b3655
Compare
e6e1bde
to
81ea424
Compare
@jbachhardie I think this is ready for the beta. I will continue finding and fixing bugs. This isn't as high priority for me anymore, so hopefully if I can fix something every week it will be ready for a full release early next year. |
Also I couldn't get the Travis stuff working. That might be the next big thing I work on. |
Just released |
Hi, I've been trying out the beta and I've ran into an issue with migrations. I'm getting a |
Hey @bsidoruk I haven't seen that specific issue before, but generally expect migrations to still have problems. I didn't give them as much love and care as they deserve. I just checked the postgres table structure and the bigint type is correct. In fact the SchemaMigration module seems to say that versions are stored as big ints, but the schema specifies that it is an int. That code was written by Jose, and seems to work fine for other adapters. Additionally that error is a mssql error, so we must be doing an inappropriate cast somewhere based on the schema type. Try doing the migrations manually. I don't really have any energy for this project any more so that's the best I can do for now, sorry. |
@jbachhardie Were you still actively working on this? I'm wondering if you ran into any of these same issues. It was your branch I was working off of. |
@bsidoruk No, I'm afraid we're not using much Elixir or SQL Server these days at Findmypast so this isn't being worked on by us anymore. I'll collaborate with anyone who wants to contribute or even take over ownership of the Hex package but this is going to have to be picked up by someone who is actually active in the Elixir community. |
@jbachhardie I have opened a PR on your branch with a solution to the migrations issue. whossname#1. I was hoping you could take a look and offer any feedback. In the meantime I will continue to work out of my own branch so I can move forward with my current project. If more comes up throughout development, it would be great to collaborate. I'm new to MSSQL and ODBC so I'm learning this as I go |
Description
An early beta version of the mssql_ecto migration to Ecto 3. This pull request should wait until the relevant mssqlex pull request is complete and the dependencies in this pull request have been updated to match.
Motivation and Context
The result of my efforts to try and update the repo to Ecto 3
How Has This Been Tested?
The unit tests have been updated so they are all passing. A large number of the integration tests are no longer passing. All tests have been updated to support Ecto 3. Some integration tests may have been removed. I will attempt to add them back in at a later date.
It probably needs to be tested against a real code base.
Known Problems
There are known problems with encoding/decoding that cause type issues. The
decoding issues are mostly because the erlang odbc driver returns strings without
any indication for the expected type, so the decoder is largely based on parsing
strings to do a best guess of the type. The encoding side of things is a mix of
I haven't got around to it yet, and not being given any indication of type for
binaries from the ecto side of things.
Problems observed in the ecto_sql integration tests:
Problems observed in the ecto integration tests:
migration lock
Types of changes
Checklist: