
USE fetchmetrics;

/*
Must remove existing Temp Ids from DOG_Command_Category before dropping table!

DROP TABLE fetchmetrics.DOG_Location_Temp;

*/

SELECT CONCAT('WARNING: Table ', TABLE_SCHEMA, '.', TABLE_NAME, ' already exists.') AS msg_warning 
FROM INFORMATION_SCHEMA.TABLES 
WHERE 
        TABLE_SCHEMA = 'fetchmetrics' 
    AND TABLE_NAME = 'DOG_Location_Temp'
;

CREATE TABLE IF NOT EXISTS fetchmetrics.DOG_Location_Temp (
	  id_temp INT NOT NULL PRIMARY KEY AUTO_INCREMENT
    , id_location INT
    , id_location_parent INT
    , code VARCHAR(250)
    , name VARCHAR(250)
	, active BIT

    , does_meet_id_filters BIT
    , does_meet_non_id_filters BIT
    , csv_id_locations_parent TEXT

    , guid BINARY(36)
);
