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

Disable schema dump after running migrations + improve SSL cert #18

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

mscoutermarsh
Copy link
Member

@mscoutermarsh mscoutermarsh commented Nov 29, 2023

Fixes: #17

Disabling schema dump

For the schema dump. I've found that when rails generates schema.rb or structure.sql, it runs an incredible amount of queries to construct the dump.

Normally, with local mysql this is fine because there is nearly no latency per query. When running this against a cloud database, it adds up very quickly.

One of our example databases takes a full minute to dump (my laptop is 30ms from the database).

By adding schema_dump=, this sets the Rails config for schema_dump to nil. Telling Rails not to run the dump.

schema_dump=false does not work because this sets it to a string, which rails interprets at the filename where we want the dump stored.

SSL

To make this more reliable for more environments. We now check the most common SSL paths for a cert. If we find one, then we pass it.

For: #17

This checks common CA paths and adds it to the connection string.
- sslca doesnt need an underscore

For the schema dump. I've found that when rails generates schema.rb or structure.sql, it runs an incredible amount of queries to construct dump.

Normally, with local mysql this is fine because there is nearly no latency per query. When running this against a cloud database, it adds up very quickly.

One of our example databases takes a full minute to dump (my laptop is 30ms from the database).

By adding `schema_dump=`, this sets the Rails config for schema_dump to nil. Telling Rails not to run the dump.

`schema_dump=false` does not work because this sets it to a string, which rails interprets at the filename where we want the dump stored.
@mscoutermarsh mscoutermarsh changed the title Attempt fix of structure.sql output Disable schema dump after running migrations + improve SSL cert Jan 12, 2024
@mscoutermarsh mscoutermarsh merged commit ec9ec0d into main Jan 12, 2024
5 checks passed
@mscoutermarsh mscoutermarsh deleted the add-ca-path branch January 12, 2024 23:27
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.

support structure.sql
2 participants