mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
15 lines
797 B
SQL
15 lines
797 B
SQL
-- Reverse UPSERT: hapus baris PFK 47 & 48 yang kemungkinan baru diinsert oleh up migration ini.
|
||
-- Jika sebelumnya sudah ada (ON CONFLICT DO UPDATE), baris ini akan terhapus —
|
||
-- restore manual dari backup jika diperlukan.
|
||
DELETE FROM farm_depreciation_manual_inputs
|
||
WHERE project_flock_id IN (47, 48);
|
||
|
||
-- UPDATE rows untuk PFK 4–27 tidak bisa di-reverse secara presisi:
|
||
-- nilai total_cost sebelum migration ini tidak tersimpan di migration history
|
||
-- (data awal di-load via cmd/import-farm-depreciation-manual-inputs dari Excel).
|
||
-- PFK 10 dan 11 tidak berubah (nilai sama dengan state dari migration 20260529144559).
|
||
-- Jika perlu rollback penuh: restore dari database backup atau re-import Excel lama.
|
||
|
||
-- Recompute snapshots setelah rollback
|
||
TRUNCATE TABLE farm_depreciation_snapshots;
|