idk
This commit is contained in:
1 parent
e68d357177
commit
3e3382df57
65 files changed
+1836
-42
No files matched your search
@@ -0,0 +1,15 @@
|
||||
-- ─── website_offer soft-delete: drop the zero-date (D4) ─────────────────────
|
||||
-- o_deleted_at was datetime NOT NULL, so "not deleted" rows carried the invalid
|
||||
-- zero-date '0000-00-00 00:00:00' (rejected under NO_ZERO_DATE/strict mode) and
|
||||
-- the app had to filter for it explicitly. Make it nullable and normalise the
|
||||
-- existing zero-dates to NULL, aligning with every other table's deleted_at.
|
||||
|
||||
ALTER TABLE `website_offer`
|
||||
MODIFY `o_deleted_at` DATETIME NULL DEFAULT NULL;
|
||||
|
||||
-- Normalise legacy "not deleted" markers to NULL. Comparing against a literal
|
||||
-- zero-date is itself unsafe under strict mode, so match by year 0 instead.
|
||||
UPDATE `website_offer`
|
||||
SET `o_deleted_at` = NULL
|
||||
WHERE `o_deleted_at` IS NOT NULL
|
||||
AND YEAR(`o_deleted_at`) = 0;
|
||||
Reference in new issue
Block a user