-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
db:schema:dump generates different code between development and test environments #37706
Comments
I am starting to think this is something related to DigitalOcean. My development environment is in Kubernetes (I use Telepresence for development) and uses DigitalOcean's managed Kubernetes. I connected a container in the development environment to the test database running locally and the dump is correct. Not sure what to do next... |
@vitobotta when I just checked, it seems that |
Hi @pixeltrix ! I was coming to update the issue because I looked into the source code and came to the same conclusion! :) The issue doesn't affect deployments with existing databases but it would be good to fix. Thanks a lot for the confirmation! :) |
@pixeltrix is this issue up for grabs? Would like the opportunity to work on a PR, if possible. I can see how the Digital Ocean MySQL databases not returning any tables options can cause issues with the |
@theasteve yes, a PR would be appreciated 👍 |
@pixeltrix i have created a PR to fix this issue |
@prashuchaudhary sorry for not noticing sooner - GitHub doesn't appear to send notifications when PR is made that mentions the issue I'm watching and I don't following the PR firehose day-to-day so didn't see it. |
Fixed by #37991. |
Steps to reproduce
db:schema:dump
in the test and development environmentsExpected behavior
The db/schema.rb generated should be the same for both environments and have valid syntax.
Actual behavior
In the test environment, the dump or migrate tasks generate
create_table
blocks like this:as you can see the
options
setting is set to the MySQL engine etc. This is valid syntax and works if I rundb:schema:load
.However, in development in dump/migrate tasks generate something like this:
It sets
options
to the full SQL statement required to create the table. This isn't valid syntax anddb:schema:load
fails.System configuration
Rails version:
I've tried with both 6.0.1 and master.
Ruby version:
2.6.5
The text was updated successfully, but these errors were encountered: