k98kurz / sqloquent

Python 3+ SQL ORM system inspired by Eloquent
Other
1 stars 0 forks source link

Add automatic timestamps to `DeletedModel` #7

Closed k98kurz closed 8 hours ago

k98kurz commented 1 week ago

Is your feature request related to a problem? Please describe.

The DeletedModel currently does not save a timestamp for when a HashedModel (or subclass) record was deleted. It does not even include a column for a timestamp.

Describe the solution you'd like

The DeletedModel should have a timestamp column. Deleting a HashedModel (or subclass) record should pass a Unix epoch timestamp to the DeletedModel.

Describe alternatives you've considered

Not having timestamps to tell when something is deleted. Seems bad.

Additional context

The HashedModel.delete method could take an optional timestamp argument that is used instead of the Unix epoch timestamp.

k98kurz commented 8 hours ago

Done