BEGIN;

DROP INDEX IF EXISTS idx_recording_depletions_source_project_flock_kandang_id;
DROP INDEX IF EXISTS idx_recording_eggs_project_flock_kandang_id;

ALTER TABLE recording_depletions
    DROP CONSTRAINT IF EXISTS fk_recording_depletions_source_project_flock_kandang_id;

ALTER TABLE recording_eggs
    DROP CONSTRAINT IF EXISTS fk_recording_eggs_project_flock_kandang_id;

ALTER TABLE recording_depletions
    DROP COLUMN IF EXISTS source_project_flock_kandang_id;

ALTER TABLE recording_eggs
    DROP COLUMN IF EXISTS project_flock_kandang_id;

COMMIT;
