
USE parts;

-- DROP TABLE IF EXISTS demo.DOG_Calc_User_Temp;

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

CREATE TABLE IF NOT EXISTS parts.DOG_Calc_User_Temp (
	  guid BINARY(36) NOT NULL
	, id_user INT
	, id_permission_required INT
	, priority_access_level_required INT
	, is_super_user BIT
	, priority_access_level_user INT
	, has_access BIT
    , can_view BIT
    , can_edit BIT
    , can_admin BIT
);