jamesaoverton / cmi-pb-terminology

CMI-PB Controlled Terminology
0 stars 0 forks source link

Implement row deletion #39

Open jamesaoverton opened 2 years ago

jamesaoverton commented 2 years ago

We need to be able to delete rows from tables. That's simple enough, but we also want to maintain validation, so I think this is a particular case of #38.

jamesaoverton commented 2 years ago

In #58 I started thinking about tracking the history of changes since the data was loaded into SQL. That alters how I'm thinking about delete_row(). Now I think that we need to keep the deleted rows somewhere in SQL. Perhaps the _conflict table could be used for this, but I think that a new _deleted table would be probably be better. As discussed for insert_row() in #58, this might also require a new 'row_meta' column to track changes that affect the full row.

lmcmicu commented 2 years ago

A _deleted table sounds better to me too. I don't like the idea of adding deleted rows to the _conflict table since the rows aren't necessarily conflict rows (or even invalid), and that might invite confusion.