
USE partsltd_prod;

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

CREATE TABLE IF NOT EXISTS partsltd_prod.PH_User_Temp (
      id_temp INT NOT NULL AUTO_INCREMENT PRIMARY KEY
    , id_user INT NOT NULL
    , id_user_auth0 VARCHAR(200)
    , firstname VARCHAR(255)
    , surname VARCHAR(255)
    , email VARCHAR(254)
    , is_email_verified BIT
    , is_super_user BIT
    , active BIT
    , guid BINARY(36) NOT NULL
);
