Closed jpmckinney closed 3 years ago
This is instead controlled by an environment variable (see stale
command source code). If all the source collections are deleted, then the schema is deleted, unless it is protected. This avoids having to separately track the creation date.
This would be a new table for general metadata about the schema. For now it would have a
protected
boolean column and acreated_at
datetime column.This would be read by a cron job that determines whether a schema can be deleted (after 6 months).
The
selected_collections
andnote
tables have multiple rows for each collection/note, so we can't reuse those without changing them to e.g. Array or JSON fields. Doing that is maybe fine, too.We would add a CLI command to mark/unmark a schema as protected.