ALTER TABLE restorations DROP INDEX invalid_flag_code ;
ALTER TABLE adjustments DROP INDEX invalid_flag_code ;
ALTER TABLE purchases DROP INDEX invalid_flag_code ;
ALTER TABLE disposals DROP INDEX invalid_flag_code ;

CREATE INDEX shipping_state_code ON shippings (shipping_state_code);

CREATE INDEX customer_id ON disposals (customer_id);

CREATE INDEX ubd ON sale_details (ubd);
CREATE INDEX udb ON shipping_details (ubd);
CREATE INDEX ubd ON purchase_details (ubd);
CREATE INDEX ubd ON restoration_details (ubd);
CREATE INDEX ubd ON adjustment_details (ubd);
CREATE INDEX ubd ON disposal_details (ubd);
CREATE INDEX ubd ON sample_details (ubd);
CREATE INDEX ubd ON stocks (ubd);

CREATE INDEX serial_number ON sale_details (serial_number);
CREATE INDEX serial_number ON shipping_details (serial_number);
CREATE INDEX serial_number ON restoration_details (serial_number);
CREATE INDEX serial_number ON adjustment_details (serial_number);
CREATE INDEX serial_number ON disposal_details (serial_number);
CREATE INDEX serial_number ON purchase_details (serial_number);
CREATE INDEX serial_number ON sample_details (serial_number);
CREATE INDEX serial_number ON stocks (serial_number);

CREATE INDEX lot_number ON stocks (lot_number);
CREATE INDEX lot_number ON sale_details (lot_number);
CREATE INDEX lot_number ON shipping_details (lot_number);
CREATE INDEX lot_number ON restoration_details (lot_number);
CREATE INDEX lot_number ON purchase_details (lot_number);
CREATE INDEX lot_number ON adjustment_details (lot_number);
CREATE INDEX lot_number ON disposal_details (lot_number);
CREATE INDEX lot_number ON sample_details (lot_number);
