-- ====================================================================
-- 07_alter_articole_terti_sters.sql
-- Adauga coloana "sters" in ARTICOLE_TERTI pentru soft-delete real
-- (separat de "activ" care e toggle business)
-- ====================================================================

ALTER TABLE ARTICOLE_TERTI ADD sters NUMBER(1) DEFAULT 0;
ALTER TABLE ARTICOLE_TERTI ADD CONSTRAINT chk_art_terti_sters CHECK (sters IN (0, 1));

-- Verifica ca toate randurile existente au sters=0
-- SELECT COUNT(*) FROM ARTICOLE_TERTI WHERE sters IS NULL;
-- UPDATE ARTICOLE_TERTI SET sters = 0 WHERE sters IS NULL;
