Delimiter //
/**
 * Author:  armen
 * Created: 2 juil. 2020
 */
Drop Procedure if exists LOADER_CREATE_TABLE_CREDITLIMIT_ACCOUNTS//
Create Procedure LOADER_CREATE_TABLE_CREDITLIMIT_ACCOUNTS ()
Begin
    Drop Table If Exists LOADER_CREDITLIMIT_ACCOUNTS;
    Create Table LOADER_CREDITLIMIT_ACCOUNTS (
                ID_LOADER_CREDITLIMIT_ACCOUNTS Int Unsigned Not Null Auto_increment
                , LOADER_CREDITLIMIT_ID_LOADER_CREDITLIMIT Int Unsigned Not Null
                , LOADER_STATUS_ID_LOADER_STATUS Int Unsigned Not Null

                , ACCOUNTS_ID_ACCOUNTS Int Unsigned Not Null 

                , ID_CREDIT_LIMIT Int Unsigned Null
                , ID_CREDIT_LIMIT_NEW Int Unsigned Null


                , Primary Key (ID_LOADER_CREDITLIMIT_ACCOUNTS)
                , Index (LOADER_STATUS_ID_LOADER_STATUS)
                , Index (LOADER_CREDITLIMIT_ID_LOADER_CREDITLIMIT)
                , Index (ACCOUNTS_ID_ACCOUNTS)
            )
        ;
End //
Delimiter ;
call LOADER_CREATE_TABLE_CREDITLIMIT_ACCOUNTS();