Soft delete
Në shqip: Fshirje e butë
ShpjegimiSQ
Soft delete do të thotë që një rresht nuk fshihet vërtet, por shënohet si i fshirë — p.sh. me një kolonë deleted_at. Kështu mund ta rikthesh nëse dikush e fshiu gabimisht, dhe historia mbetet.
EnglishEN
Soft delete means a row isn't really deleted, just marked as deleted — for example with a deleted_at column. That way you can restore it if someone deleted it by mistake, and the history is kept.
Si ta mendosh
Si koshi i plehrave në kompjuter: skedari duket i zhdukur, por mund ta nxjerrësh sërish derisa ta zbrazësh koshin.
Lexoje në anglisht
Like the recycle bin on your computer: the file looks gone, but you can get it back until you empty the bin.
Shembull kodisql
UPDATE perdoruesit SET deleted_at = NOW() WHERE id = 7;
SELECT * FROM perdoruesit WHERE deleted_at IS NULL;