BEGIN;

--? Child Indexes(optional, biar rapi tapi klo gada juga ilang pas di drop) 
DROP INDEX IF EXISTS idx_recording_stocks_product;
DROP INDEX IF EXISTS idx_recording_stocks_recording;


DROP INDEX IF EXISTS idx_recording_depl_recording;

DROP INDEX IF EXISTS idx_recording_bws_recording;

--? Child Tables
DROP TABLE IF EXISTS recording_stocks;
DROP TABLE IF EXISTS recording_depletions;
DROP TABLE IF EXISTS recording_bws;

--? Parent Indexes ON recordings
DROP INDEX IF EXISTS uq_recordings_flock_record_date;
DROP INDEX IF EXISTS idx_recordings_flock_datetime;

--? Parent table
DROP TABLE IF EXISTS recordings;

COMMIT;