Greg Stein <gst...@gmail.com> writes: > But that said, there is an argument for combining all three conceptual > tables into one. Is that was you guys were suggesting?
Yes. The tables are so similar. For example, base_node's repos_id/repos_relpath/revnum and the working_node's copyfrom_id/copyfrom_relpath/copyfrom_revnum and both a sort of "repos-node-rev". For op_depth 0 the repos-node-rev is always set, there is pristine content and it's the same node in the repository and wc. For other op_depth the repos-node-rev is optional, copies have it, adds don't; but when it exists it means much the same: the node has pristine content. op_depth tells us whether the repos-node-rev is a copy or a base and that's exactly what op_depth is for. Now op_depth 0 can be split out into a separate base_node table, our current model, but during our meeting we were wondering if that is necessary or useful. We do have to have all fields at all op_depth, and some are not always valid. dav_cache only applies to op_depth 0, translated_size only applies the the greatest op_depth for any local_relpath, etc.; but most of the fields are common. Even dav_cache might apply to higher levels, perhaps it could be useful for the copyfrom? -- Philip