-- Create Table Statement for 'Provisioning Transaction'
DROP TABLE IF EXISTS `PROVISIONING_TRANSACTION`;
CREATE TABLE `PROVISIONING_TRANSACTION` (
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	REQUEST_DATE datetime,
	STATUS_CL varchar,
	RESPONSE_CODE varchar,
	RESPONSE_MESSAGE varchar,
	RESPONSE_DATE datetime,
	OPERATION_CL varchar,
	BILLING_PROFILE_TYPE varchar,
	PROVIDER_MERCHANT_CODE varchar,
	MERCHANT_CODE int(11),
	MERCHANT_IS_ACTIVE tinyint(1),
	MERCHANT_CREATE_DATE datetime,
	MERCHANT_DEACTIVATE_DATE datetime,
	MERCHANT_TIME_ZONE varchar,
	MERCHANT_DEPOSIT_INFO_HOLDER_NAME varchar,
	MERCHANT_PROCESSING_CONFIG_MERCHANT_CATEGORY_CODE varchar,
	MERCHANT_PROCESSING_CONFIG_CARD_DESCRIPTOR varchar,
	BUSINESS_INFO_FEDERAL_TAX_ID varchar,
	BUSINESS_INFO_LEGAL_NAME varchar,
	BUSINESS_INFO_STREET1 varchar,
	BUSINESS_INFO_STREET2 varchar,
	BUSINESS_INFO_CITY varchar,
	BUSINESS_INFO_STATE varchar,
	BUSINESS_INFO_ZIP_CODE varchar,
	BUSINESS_INFO_COUNTRY_CODE varchar,
	BUSINESS_INFO_WEB_SITE varchar,
	BUSINESS_INFO_ESTIMATED_AVG_TRANSACTION_AMOUNT int(11),
	CONTACT_INFO_CONTACT_NAME varchar,
	CONTACT_INFO_STREET1 varchar,
	CONTACT_INFO_STREET2 varchar,
	CONTACT_INFO_CITY varchar,
	CONTACT_INFO_STATE varchar,
	CONTACT_INFO_ZIP_CODE varchar,
	CONTACT_INFO_COUNTRY_CODE varchar,
	CONTACT_INFO_PHONE varchar,
	BUSINESS_OWNER_PRIMARY_FIRST_NAME varchar,
	BUSINESS_OWNER_PRIMARY_LAST_NAME varchar,
	BUSINESS_OWNER_PRIMARY_SOCIAL_SECURITY varchar,
	BUSINESS_OWNER_PRIMARY_BIRTH_DATE datetime,
	BUSINESS_OWNER_PRIMARY_STREET1 varchar,
	BUSINESS_OWNER_PRIMARY_STREET2 varchar,
	BUSINESS_OWNER_PRIMARY_CITY varchar,
	BUSINESS_OWNER_PRIMARY_STATE varchar,
	BUSINESS_OWNER_PRIMARY_ZIP_CODE varchar,
	BUSINESS_OWNER_PRIMARY_COUNTRY_CODE varchar,
	BUSINESS_OWNER_PRIMARY_PHONE varchar,
	BUSINESS_OWNER_PRIMARY_EMAIL varchar,
	BUSINESS_OWNER_SECONDARY_FIRST_NAME varchar,
	BUSINESS_OWNER_SECONDARY_LAST_NAME varchar,
	BUSINESS_OWNER_SECONDARY_SOCIAL_SECURITY varchar,
	BUSINESS_OWNER_SECONDARY_BIRTH_DATE datetime,
	BUSINESS_OWNER_SECONDARY_STREET1 varchar,
	BUSINESS_OWNER_SECONDARY_STREET2 varchar,
	BUSINESS_OWNER_SECONDARY_CITY varchar,
	BUSINESS_OWNER_SECONDARY_STATE varchar,
	BUSINESS_OWNER_SECONDARY_ZIP_CODE varchar,
	BUSINESS_OWNER_SECONDARY_COUNTRY_CODE varchar,
	BUSINESS_OWNER_SECONDARY_PHONE varchar,
	BUSINESS_OWNER_SECONDARY_EMAIL varchar,
	PROCESSING_PROFILE_FK bigint(20),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	BUSINESS_INFO_ESTIMATED_TRANSACTION_VOLUME int(11),
	BUSINESS_INFO_EMAIL varchar,
	BUSINESS_INFO_OWNERSHIP_STRUCTURE varchar,
	BUSINESS_INFO_CURRENCY_CODE varchar,
	BUSINESS_INFO_ESTIMATION_PERIOD varchar,
	BUSINESS_INFO_ESTIMATED_MAX_TRANSACTION_AMOUNT int(11),
	BUSINESS_ESTIMATES_ENTRY_MODE_RETAIL int(11),
	BUSINESS_ESTIMATES_ENTRY_MODE_ECOMMERCE int(11),
	BUSINESS_ESTIMATES_ENTRY_MODE_MAIL int(11),
	BUSINESS_ESTIMATES_ENTRY_MODE_PHONE int(11),
	BUSINESS_ESTIMATES_ENTRY_MODE_TRADESHOW int(11),
	BUSINESS_ESTIMATES_CARD_TYPE_VISA int(11),
	BUSINESS_ESTIMATES_CARD_TYPE_MASTERCARD int(11),
	BUSINESS_ESTIMATES_CARD_TYPE_AMEX int(11),
	BUSINESS_ESTIMATES_CARD_TYPE_DISCOVER int(11),
	BUSINESS_ESTIMATES_CARD_TYPE_OTHER int(11),
	MERCHANT_PROCESSING_CONFIG_VISA_MID varchar,
	MERCHANT_PROCESSING_CONFIG_MASTER_CARD_MID varchar,
	MERCHANT_PROCESSING_CONFIG_AMEX_MID varchar,
	MERCHANT_PROCESSING_CONFIG_DISCOVER_MID varchar,
	MERCHANT_CHARGE_INFO_HOLDER_NAME varchar,
	MERCHANT_CHARGE_INFO_ACCOUNT_NUMBER_MASKED varchar,
	MERCHANT_CHARGE_INFO_ROUTING_NUMBER_MASKED varchar,
	MERCHANT_PROCESSING_CONFIG_CUSTOMER_SERVICE_PHONE varchar,
	BOARDING_MID varchar,
	BUSINESS_INFO_BUSINESS_NAME varchar,
	MERCHANT_DEPOSIT_INFO_BANK_NAME varchar,
	CONTACT_INFO_EMAIL varchar,
	SUB_BATCH_FK bigint(20),
	MERCHANT_CHARGE_INFO_BANK_NAME varchar,
	ONBOARDING_APPLICATION_CODE bigint(20),
	BUSINESS_INFO_CUSTOMER_SERVICE_PHONE varchar,
	RESELLER_CODE int(11),
	FEE_SCHEMA varchar,
	PROCESSOR_IDENTITY1 varchar,
	PROCESSOR_IDENTITY2 varchar,
	PROCESSOR_IDENTITY3 varchar,
	MERCHANT_DEPOSIT_INFO_ACCOUNT_NUMBER_MASKED varchar,
	MERCHANT_DEPOSIT_INFO_ROUTING_NUMBER_MASKED varchar,
	BUSINESS_INFO_FEDERAL_TAX_ID varchar,
	BUSINESS_INFO_OWNERSHIP_STRUCTURE varchar,
	BUSINESS_INFO_ESTIMATION_PERIOD varchar,
	VANTIV_TANDEM_PROVISIONING_TRANSACTION_FK bigint(20),
	PROVISIONING_VERIFICATION_RESULT_FK bigint(20),
	PROVISIONING_TRANSACTION_RESPONSE_DETAIL_FK bigint(20),
	FIRST_DATA_PROVISIONING_REPORT_FK bigint(20),
	PROPAY_PROVISIONING_TRANSACTION_FK bigint(20),
	BUSINESS_OWNER_DRIVER_LICENSE_MASKED varchar,
	BUSINESS_OWNER_DRIVER_LICENSE_STATE varchar,
	BUSINESS_OWNER_DRIVER_LICENSE_COUNTRY_CODE varchar,
	MERCHANT_PROCESSING_CONFIG_ECHECK_DESCRIPTOR varchar,
	MERCHANT_PROCESSING_CONFIG_ECHECK_MERCHANT_NAME varchar,
	MERCHANT_PROCESSING_CONFIG_IS_AMEX_OPT_BLUE_ACQUIRED tinyint(1),
	IS_ECHECK_ENABLED tinyint(1),
	REQUEST_TYPE varchar,
	MERCHANT_NOTES varchar,
	MERCHANT_DEPOSIT_INFO_ACCOUNT_TYPE varchar,
	BUSINESS_INFO_WORK_HOURS varchar,
	BUSINESS_INFO_REGISTRATION_YEAR int(11),
	BUSINESS_INFO_REGISTRATION_STATE varchar,
	BUSINESS_INFO_REGISTRATION_COUNTRY_CODE varchar,
	FEE_PREFIX varchar,
	PROCESSOR_APPLICATION_ID varchar,
	FEE_TEMPLATE_CODE_ENCRYPTED varchar,
	DISTRIBUTION_SCHEMA_CODE varchar,
	NOTIFICATION_POLICY varchar,
	PARENT_MERCHANT_CODE int(11),
	MERCHANT_MERCHANT_PROFILE varchar,
	BUSINESS_INFO_RELATIONSHIP_BEGIN_DATE datetime,
	ACCOUNT_STORE bigint(20),
	ACCOUNT_STORE_FK bigint(20),
	ACCOUNT_STORE_FK bigint(20),
	CLIENT_HOST varchar,
	CLIENT_HOST varchar,
	RESPONSE_CODE varchar,
	RESPONSE_CODE varchar,
	BUSINESS_INFO_FEDERAL_TAX_ID varchar,
	MERCHANT_TYPE varchar,
	ACCOUNT_STORE bigint(20),
	BUSINESS_INFO_FEDERAL_TAX_ID varchar,
	MERCHANT_TYPE varchar,
	ACCOUNT_STORE_FK bigint(20),
	CLIENT_HOST varchar,
	ACCOUNT_STORE_FK bigint(20),
	MERCHANT_TYPE varchar,
	TERMINAL_REF_CODE_ENCRYPTED varchar,
	SUB_BATCH_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	ACCOUNT_STORE_FK bigint(20),
	ACCOUNT_STORE_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	SUB_BATCH_FK bigint(20),
	PROCESSOR_IDENTITY4 varchar,
	PROCESSOR_IDENTITY4 varchar,
	ACCOUNT_STORE_FK bigint(20),
	PROCESSOR_IDENTITY1 varchar,
	PROCESSOR_IDENTITY2 varchar,
	PROCESSOR_IDENTITY3 varchar,
	SUB_BATCH_FK bigint(20),
	PROCESSOR_IDENTITY4 varchar,
	NEXT_ACTION varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROCESSOR_IDENTITY3 varchar,
	ORIGINAL_PROVISIONING_TRANSACTION bigint(20),
	BUSINESS_OWNER_PRIMARY_STAKE_PERCENTAGE int(11),
	BUSINESS_OWNER_PRIMARY_STAKE_PERCENTAGE int(11),
	NEXT_ACTION varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROCESSOR_IDENTITY3 varchar,
	ORIGINAL_PROVISIONING_TRANSACTION bigint(20),
	PROCESSOR_IDENTITY0 varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROCESSOR_IDENTITY1 varchar,
	PROCESSOR_IDENTITY2 varchar,
	PROCESSOR_IDENTITY3 varchar,
	PROCESSOR_IDENTITY0 varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	OPERATION_CL varchar,
	STATUS_CL varchar,
	PROVIDER_RESPONSE_CODE varchar,
	PROVIDER_RESPONSE_MESSAGE varchar,
	PROVIDER_REFERENCE_NUMBER varchar,
	BUSINESS_OWNER_PRIMARY_TITLE varchar,
	ONBOARDING_APPLICATION_STAGE_FK bigint(20),
	PROCESSOR_IDENTITY3 varchar,
	BUSINESS_INFO_DESCRIPTOR_PHONE varchar,
	PROCESSING_PROFILE_FK bigint(20),
	BUSINESS_OWNER_PRIMARY_STAKE_PERCENTAGE int(11),
	NEXT_ACTION varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	ORIGINAL_PROVISIONING_TRANSACTION bigint(20),
	PROCESSOR_IDENTITY0 varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	PROCESSOR_APPLICATION_ID varchar,
	ESTIMATES_ANNUAL_DIRECT_DEBIT_VOLUME int(11),
	ESTIMATES_ANNUAL_CARDS_VOLUME int(11),
	ESTIMATES_AVG_DIRECT_DEBIT_TRANSACTION_AMOUNT int(11),
	ESTIMATES_AVG_CARDS_TRANSACTION_AMOUNT int(11),
	PROVIDER_RESPONSE_CODE varchar,
	PROVIDER_RESPONSE_MESSAGE varchar,
	PROVIDER_REFERENCE_NUMBER varchar,
	ONBOARDING_APPLICATION_STAGE_FK bigint(20),
	BUSINESS_OWNER_PRIMARY_TITLE varchar,
	BUSINESS_INFO_DESCRIPTOR_PHONE varchar,
	PROCESSOR_APPLICATION_ID varchar,
	ESTIMATES_ANNUAL_DIRECT_DEBIT_VOLUME int(11),
	ESTIMATES_ANNUAL_CARDS_VOLUME int(11),
	ESTIMATES_AVG_DIRECT_DEBIT_TRANSACTION_AMOUNT int(11),
	ESTIMATES_AVG_CARDS_TRANSACTION_AMOUNT int(11),
	OPERATION_CL varchar,
	STATUS_CL varchar,
	PROCESSING_PROFILE_FK bigint(20),
	PROVIDER_RESPONSE_CODE varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROCESSOR_IDENTITY1_BAK varchar,
	PROCESSOR_IDENTITY2_BAK varchar,
	PROCESSOR_IDENTITY3_BAK varchar,
	PROVIDER_RESPONSE_CODE varchar,
	PROVIDER_RESPONSE_MESSAGE varchar,
	PROVIDER_REFERENCE_NUMBER varchar,
	ONBOARDING_APPLICATION_STAGE_FK bigint(20),
	BUSINESS_OWNER_PRIMARY_TITLE varchar,
	BUSINESS_INFO_DESCRIPTOR_PHONE varchar,
	ESTIMATES_ANNUAL_DIRECT_DEBIT_VOLUME int(11),
	ESTIMATES_ANNUAL_CARDS_VOLUME int(11),
	ESTIMATES_AVG_DIRECT_DEBIT_TRANSACTION_AMOUNT int(11),
	ESTIMATES_AVG_CARDS_TRANSACTION_AMOUNT int(11),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;