Ruby on Rails
Wednesday, August 28, 2019
Given Rails issues like https://github.com/rails/rails/issues/36921 and projects like https://github.com/SchemaPlus/schema_plus_enums, it seems like there's a real desire to use Postgres custom types in Rails without having to resort to `structure.sql`. (`structure.sql` support has gotten a lot better, but it's still vulnerable to e.g. nonsense churn caused by folks running different DB versions locally.)
Other Postgres-specific features, such as foreign data wrappers, are near-unusable within Rails when you're committing your schema -- `schema.rb` ignores them, and `structure.sql` encodes information that should never be committed, like database passwords.
I don't think that Rails maintainers should be obligated to maintain `schema.rb` dumpers for a lot of different, esoteric database-specific features. But right now, if you want to extend `schema.rb`'s functionality, you need to monkeypatch Rails internals; it's fragile when upgrading.
-- Other Postgres-specific features, such as foreign data wrappers, are near-unusable within Rails when you're committing your schema -- `schema.rb` ignores them, and `structure.sql` encodes information that should never be committed, like database passwords.
I don't think that Rails maintainers should be obligated to maintain `schema.rb` dumpers for a lot of different, esoteric database-specific features. But right now, if you want to extend `schema.rb`'s functionality, you need to monkeypatch Rails internals; it's fragile when upgrading.
I'd like there to be a stable, external-facing interface allowing folks to extend `schema.rb` dumpers with database-specific features, without monkeypatching. I'm happy to take on the work of implementing this, but I wanted to raise this as an issue first so that if the core team isn't interested in this as a feature no work is wasted.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1af67230-4dad-467f-95a5-f41b8e8da620%40googlegroups.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment