conveyal / gtfs-editor

A web-based GTFS editing framework. THIS PROJECT IS DEPRECATED. See https://github.com/ibi-group/datatools-ui for current version.
https://github.com/ibi-group/datatools-ui
MIT License
134 stars 63 forks source link

Cascaded delete in MapDB #180

Closed mattwigway closed 9 years ago

mattwigway commented 9 years ago

All of the delete controllers need to handle cascaded delete, which is hard because there is some cross-dependency between unversioned and versioned data (e.g. deleting a stop requires also deleting things from particular agency feeds, but we don't know which ones, etc.) Or maybe you just shouldn't be able to delete route types and stops.

We could do crude reference counting by keeping a long referenceCount in unversioned objects, but that seems prone to errors. Also, when can you delete a stop - when it's used in no agency's master, or when it's used in no agency snapshot?

Perhaps we just mark things as "deleted" and hide them from the UI. We could have a warning on export if we're exporting things that have been deleted.

mattwigway commented 9 years ago

Related to #166.