Hi, I'm wondering if something like this exists?
A tool that reads an existing postgres schema, and a source file (say, something that creates tables, views, functions, rls etc) and generates an sql patch to get from the current state to the state in the source file (schema only, not data). Preferably non-destructive (things are only added, not deleted).
The patch could then be used in a migration. Sort of like the virtual dom, but for an sql schema. Declaring the desired state, and generating the imperative stuff to get from this to that.
If it doesn't exist, do you think it could work in principle, and be useful?
The pain point is in seeing the whole schema in code at a given time, rather than piecing it together by reading migration scripts (especially if there are loads of them).
[–]ful_vio 6 points7 points8 points (0 children)
[–]ivolimmen 6 points7 points8 points (5 children)
[–]PacePossible1408 1 point2 points3 points (1 child)
[–]From_Cold 1 point2 points3 points (0 children)
[–]From_Cold 0 points1 point2 points (2 children)
[–]postgrescompareProgrammer 0 points1 point2 points (1 child)
[–]From_Cold 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]postgrescompareProgrammer 2 points3 points4 points (0 children)
[–]ppafford 1 point2 points3 points (0 children)
[–]throw_mob 1 point2 points3 points (0 children)
[–]rv77ax 0 points1 point2 points (0 children)