-
Notifications
You must be signed in to change notification settings - Fork 124
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
Primary key is of type integer in test environment. #45
Comments
That's because you are creating test db from schema and not from migrations. Use sql schema, schema.rb doesn't support uuid fields |
I use standard rails conventions when running my tests / specks. Check out the repo then run git clone PROJECT &&
cd PROJECT_DIR
bundle
rake db:create
rake db:migrate
rake I like keeping things consistent and I'd prefer this to just work like all my other projects. |
Yeah, fixing schema dumper will help. But it is too much work |
You mean fixing schema dumber in ActiveRecord or some part of it as part of this gem? |
Exactly |
No I mean do you have any idea where the base place for this fix is? |
If I'd had, I'd perform this by myself. Unfortunately, the source of schema dumper is so shitty, so I'm afraid there is no place to do this and we have to patch big pieces of code for every rails version specifically. Which version do you use? |
The project I'm working on is a green field rails 4 project. |
Yes this is so strange the schema dumber total assumes that the id column is an auto increment integer column and just skips the definition entirely: |
exactly So if you want to fix this rather then use sql schema - you have to dig through all this mess |
I guess I'll have to live with it ASIS and just work around it. |
The schema dumper will hopefully be much better for handling these sorts of ID fields in Rails 5: rails/rails@3628025 |
When I run my rails specs I see that the primary key is of type int(11) instead of being binary(16) and then the id field is of type int instead of being an uuid.
Development version of MySql
Test version of MySql
Dose any body have a clue on what is going on hear?
The text was updated successfully, but these errors were encountered: