-- Migration: Remove exclusion constraint to allow overlapping stays for same resident
-- Purpose: Allow a resident to have multiple simultaneous stays in different beds with overlapping time periods
-- Created: 2026-05-12

-- Drop the exclusion constraint that prevents overlapping occupancy periods
ALTER TABLE IF EXISTS resident_stays
DROP CONSTRAINT IF EXISTS exc_resident_stays_no_overlap;

-- Verify the migration was successful
-- SELECT * FROM pg_constraint WHERE conname = 'exc_resident_stays_no_overlap';
