I'm making a web app with Laravel and PostgreSQL where many records in almost all tables in the database need to be kept by historical reasons (users need to search old data for statistical reasons). Laravel provides soft-deleting working out-of-box, so why not to use this feature (soft deletion) as a mechanism for deactivating records in the database?
Is it a good idea? or is better to create a disabled_at field to mark a record as inactive/disabled instead of using the deleted_at field?
Using the Laravel's built-in soft delete feature is kinda easier due the existence of Eloquent's methods to retrieve or restore the soft deleted records.
Any help is really much appreciate it, thanks.
deleted_atfield in a db table should think "this is for marking it as deleted not deactivated"... and if I use this db in contexts wheredeleted_atmust mean and only mean marked for deletion sure I'll need another field just to mark a record as deactivated but must not be deleted... so... in order to keep things standards(?) I suppose I should use adisabled_atfield. – Dovahkiin Jul 13 '23 at 02:46