-- =============================================
-- Author:      System
-- Create date: 2025-12-31
-- Description: Adds parent_id to modulos table for hierarchical support.
-- =============================================

ALTER TABLE modulos
ADD COLUMN IF NOT EXISTS parent_id INT REFERENCES modulos(id);

-- Optional: Create an index for performance
CREATE INDEX IF NOT EXISTS idx_modulos_parent_id ON modulos(parent_id);
