Delimiter //
/**
 * Table des nouveau "RECLAIMS_DETAILS" fermant les réclamation ouverte
 * si lettrage total
 * #7326
 */
Drop Procedure if exists LOADER_CREATE_TABLE_MATCHINGCODES_NEW_RECLAIMS_DETAILS//
Create Procedure LOADER_CREATE_TABLE_MATCHINGCODES_NEW_RECLAIMS_DETAILS()
Begin

    Drop Table If Exists LOADER_MATCHINGCODES_NEW_RECLAIMS_DETAILS;

    Create Table LOADER_MATCHINGCODES_NEW_RECLAIMS_DETAILS(
        -- champs pour le traitements de l'import
        LOADER_STATUS_ID_LOADER_STATUS Int Not Null

		, ENTRIES_ID_ENTRIES  Int Unsigned Not Null
		, DF_RCLM_STT_ID_DF_RCLM_STT Int Unsigned Not Null
		, DF_RCLM_ID_DF_RCLM Int Unsigned Not Null
		, RECLAIMS_ID_RECLAIMS Int Unsigned Not Null
		, RECLAIMS_DETAILS_OPINION Int Unsigned Null
		, RECLAIMS_DETAILS_LAST_UPDATE DateTime
		, RECLAIMS_DETAILS_BLOCKED smallint null
		, RECLAIMS_DETAILS_DEAD_LINE date null
		, RECLAIMS_DETAILS_CLOSED smallint null
		, RECLAIMS_DETAILS_AMOUNT Decimal(19, 4) null
		, RECLAIMS_DETAILS_PREV_RECLAIM Int Unsigned Not Null
		, RECLAIMS_DETAILS_IS_ACTIVE smallint null
		, RECLAIMS_DETAILS_IS_TMP  smallint null
		, RECLAIMS_DETAILS_NOTES Text

        -- reccourci pour les historiques
		, DF_SUMMARIES_ID_DF_SUMMR Int Unsigned Null
        -- contraintes et indexes
--         , Primary Key (NEW_ID_RECLAIMS)
        , Index (LOADER_STATUS_ID_LOADER_STATUS)

    ) ;

End //

Delimiter ;
CALL LOADER_CREATE_TABLE_MATCHINGCODES_NEW_RECLAIMS_DETAILS();