3 ms·
Stored procedure: https://en.wikipedia.org/wiki/Stored_procedure https://en.wikipedia.org/wiki/Stored_procedure Are there SQL migration tools like Alembic and
by westurner 3y ago
Stored procedure: https://en.wikipedia.org/wiki/Stored_procedure https://en.wikipedia.org/wiki/Stored_procedure
Are there SQL migration tools like Alembic and South that also version and sync Stored Procedures? (Alembic on "Replaceable objects" and schema: https://alembic.sqlalchemy.org/en/latest/cookbook.html#replaceable-objects https://alembic.sqlalchemy.org/en/latest/cookbook.html#repla... , alembic_utils: https://github.com/olirice/alembic_utils https://github.com/olirice/alembic_utils )
From "What ORMs have taught me: just learn SQL (2014)"
https://news.ycombinator.com/item?id=15949610 https://news.ycombinator.com/item?id=15949610 :
> ORMs:
> - Are maintainable by a team. "Oh, because that seemed faster at the time."
> - Are unit tested: eventually we end up creating at least structs or objects anyway, and then that needs to be the same everywhere, and then the abstraction is wrong because "everything should just be functional like SQL" until we need to decide what you called "the_initializer2".
> - Can make it very easy to create maintainable test fixtures which raise exceptions when the schema has changed but the test data hasn't.
ORMs may help catch incomplete migrations; for example when every reference to a renamed column hasn't been updated, or worse when foreign key relations changed breakingly.
django_rest_assured generates many tests for the models (SQL)/views/API views in a very DRY way from ORM schema and view/controller/route registrations, but is not as fast as e.g. FastAPI w/ SQLalchemy or django-ninja.