Open erichanson opened 9 months ago
This dovetails into the whole question of "What even is a trackable row."
Knowns:
untracked_rows
is an awesome feature. There's something very magic though about knowing that everything in the database is either ignored by rule, tracked by a bundle, or shows up in untracked. It means there's a record of everything, no shenanigans.untracked_rows
is expensive to compute, because you have to look at every row in the whole database and see if it's in the head commit of any bundle. It requires sane maintenance of global ignore rules.Proposal:
bundle.bundle_tracked_relation
There may be an analog here to the infamous Oops, You Wrote a Database w.r.t. grant, policies, roles, and row-level security. All of this can probably be declared and enforced by policy in an elegant way. Bears much consideration.
Oops, You Wrote a ACL
Right now there's just one global table for
ignored_schema
,ignored_relation
,ignored_row
andignored_column
, andtrackable_nontable_relation
. The rows in these tables are verson-controlled, so when you checkout a commit, the entire bundle system's behavior can be modified. This needs to change. There's a use for global ignore rules (e.g. ignoring bundle's internal tables), but there also needs to be per-bundle "scope of concern" setting. Some bundles will want to track schema (e.g. putting a meta row intrackable_nontable_relation
), others will not.