-- Create Table Statement for 'First Data Compass Auth Retail Transaction'
DROP TABLE IF EXISTS `FIRST_DATA_COMPASS_AUTH_RETAIL_TRANSACTION`;
CREATE TABLE `FIRST_DATA_COMPASS_AUTH_RETAIL_TRANSACTION` (
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	ORDER_NUMBER varchar,
	MOP_REQUEST varchar,
	DIVISION_NUMBER varchar,
	AMOUNT varchar,
	TRANSACTION_TYPE varchar,
	ACTION_CODE varchar,
	PARTIAL_REDEMPTION_INDICATOR varchar,
	TPP_ID varchar,
	BILLER_REFERENCE_NUMBER varchar,
	TRACK_INDICATOR varchar,
	LENGTH_INDICATOR varchar,
	CARD_SECURITY_PRESENCE varchar,
	NAME_TEXT varchar,
	ADDRESS_LINE1 varchar,
	COUNTRY_CODE varchar,
	CITY varchar,
	STATE varchar,
	POSTAL_CODE varchar,
	RESPONSE_REASON_CODE varchar,
	RESPONSE_DATE varchar,
	AUTHORIZATION_CODE varchar,
	AVS_RESPONSE_CODE varchar,
	CSV_RESPONSE_CODE varchar,
	RECURRING_PAYMENT_ADVICE_CODE varchar,
	CAVV_RESPONSE_CODE varchar,
	CURRENT_BALANCE varchar,
	REDEMPTION_AMOUNT varchar,
	TOTAL_AMOUNT varchar,
	SURCHARGE_AMOUNT varchar,
	TRACE_NUMBER varchar,
	CLIENT_REF varchar,
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	ENCRYPTION_FLAG varchar,
	FIRST_DATA_TOKEN_CODE varchar,
	TOKEN_TYPE varchar,
	TERMINAL_ID varchar,
	DESCRIPTION varchar,
	MERCHANT_STREET varchar,
	MERCHANT_CITY varchar,
	MERCHANT_REGION varchar,
	MERCHANT_POSTAL_CODE varchar,
	MERCHANT_COUNTRY_CODE varchar,
	MOP_RESPONSE varchar,
	CHARGE_TRANSACTION_FK bigint(20),
	CASH_BACK_AMOUNT_REQUESTED varchar,
	CURRENCY_CODE varchar,
	CHIP_DATA varchar,
	ACCOUNT_TYPE_DEBIT varchar,
	ACCOUNT_TYPE_EBT varchar,
	VOUCHER_NUMBER varchar,
	PARTIAL_REDEMPTION_INDICATOR_GIFT varchar,
	CASH_BACK_AMOUNT_APPROVED varchar,
	CASH_BACK_AMOUNT varchar,
	FOOD_AND_CONSUMER_NUMBER varchar,
	QHP_AMOUNT varchar,
	RX_AMOUNT varchar,
	VISION_AMOUNT varchar,
	CLINIC_OTHER_AMOUNT varchar,
	DENTAL_AMOUNT varchar,
	DEVICE_TYPE varchar,
	PAYMENT_DEVICE varchar,
	POS_CAPABILITY_CODE varchar,
	POS_ENTRY_MODE varchar,
	POS_ENTRY_MODE_RESPONSE varchar,
	CHIP_DATA_RESPONSE varchar,
	BALANCE_TYPE1 varchar,
	BALANCE_TYPE2 varchar,
	BALANCE_TYPE3 varchar,
	BALANCE_TYPE4 varchar,
	BALANCE_TYPE5 varchar,
	BALANCE_TYPE6 varchar,
	BALANCE_AMOUNT1 varchar,
	BALANCE_AMOUNT2 varchar,
	BALANCE_AMOUNT3 varchar,
	BALANCE_AMOUNT4 varchar,
	BALANCE_AMOUNT5 varchar,
	BALANCE_AMOUNT6 varchar,
	PREVIOUS_BALANCE varchar,
	ORIGINAL_REFERENCE_NUMBER varchar,
	SUBTYPE_FLAG varchar,
	SPECIAL_PAYMENT_TYPE_INDICATOR varchar,
	CRYPTOGRAM_TYPE varchar,
	INITIATION_INDICATOR varchar,
	ORIGINAL_DATA_REQUEST_INDICATOR varchar,
	ORIGINAL_VISA_TRANSACTION_ID varchar,
	SCHEDULE_INDICATOR varchar,
	STORED_CREDENTIAL_INDICATOR varchar,
	VISA_TRANSACTION_ID varchar,
	CARD_TYPE_INFO1 varchar,
	TRACE_NUMBER_RESPONSE varchar,
	SPECIAL_PAYMENT_TYPE_INDICATOR varchar,
	CRYPTOGRAM_TYPE varchar,
	INITIATION_INDICATOR varchar,
	ORIGINAL_DATA_REQUEST_INDICATOR varchar,
	ORIGINAL_VISA_TRANSACTION_ID varchar,
	SCHEDULE_INDICATOR varchar,
	STORED_CREDENTIAL_INDICATOR varchar,
	VISA_TRANSACTION_ID varchar,
	TOKEN_ASSURANCE_LEVEL varchar,
	ACCOUNT_STATUS varchar,
	TOKEN_REQUESTOR_ID varchar,
	MERCHANT_CATEGORY_CODE varchar,
	MERCHANT_ID varchar,
	BILL_TO_FIRST_NAME varchar,
	BILL_TO_LAST_NAME varchar,
	SHIP_TO_FIRST_NAME varchar,
	SHIP_TO_LAST_NAME varchar,
	BILL_TO_TELEPHONE_TYPE varchar,
	BILL_TO_TELEPHONE_NUMBER varchar,
	SHIP_TO_NAME_TEXT varchar,
	SHIP_TO_ADDRESS_LINE1 varchar,
	SHIP_TO_COUNTRY_CODE varchar,
	SHIP_TO_CITY varchar,
	SHIP_TO_POSTAL_CODE varchar,
	SHIP_TO_STATE varchar,
	EMAIL_ADDRESS varchar,
	MESSAGE_TYPE varchar,
	FORMAT_VERSION varchar,
	CARD_TYPE_INFO2 varchar,
	CURRENT_BALANCE_SIGN varchar,
	CURRENT_BALANCE_CURRENCY_CODE varchar,
	CURRENT_BALANCE_SIGN varchar,
	CURRENT_BALANCE_CURRENCY_CODE varchar,
	CASH_BACK_AMOUNT_REQUESTED varchar,
	CURRENCY_CODE varchar,
	CHIP_DATA varchar,
	ACCOUNT_TYPE_DEBIT varchar,
	ACCOUNT_TYPE_EBT varchar,
	VOUCHER_NUMBER varchar,
	PARTIAL_REDEMPTION_INDICATOR_GIFT varchar,
	CASH_BACK_AMOUNT_APPROVED varchar,
	CASH_BACK_AMOUNT varchar,
	FOOD_AND_CONSUMER_NUMBER varchar,
	QHP_AMOUNT varchar,
	RX_AMOUNT varchar,
	VISION_AMOUNT varchar,
	CLINIC_OTHER_AMOUNT varchar,
	DENTAL_AMOUNT varchar,
	DEVICE_TYPE varchar,
	PAYMENT_DEVICE varchar,
	POS_CAPABILITY_CODE varchar,
	POS_ENTRY_MODE varchar,
	POS_ENTRY_MODE_RESPONSE varchar,
	CHIP_DATA_RESPONSE varchar,
	BALANCE_TYPE1 varchar,
	BALANCE_TYPE2 varchar,
	BALANCE_TYPE3 varchar,
	BALANCE_TYPE4 varchar,
	BALANCE_TYPE5 varchar,
	BALANCE_TYPE6 varchar,
	BALANCE_AMOUNT1 varchar,
	BALANCE_AMOUNT2 varchar,
	BALANCE_AMOUNT3 varchar,
	BALANCE_AMOUNT4 varchar,
	BALANCE_AMOUNT5 varchar,
	BALANCE_AMOUNT6 varchar,
	PREVIOUS_BALANCE varchar,
	ORIGINAL_REFERENCE_NUMBER varchar,
	SUBTYPE_FLAG varchar,
	CARD_TYPE_INFO1 varchar,
	TRACE_NUMBER_RESPONSE varchar,
	TOKEN_ASSURANCE_LEVEL varchar,
	ACCOUNT_STATUS varchar,
	TOKEN_REQUESTOR_ID varchar,
	MERCHANT_CATEGORY_CODE varchar,
	MERCHANT_ID varchar,
	BILL_TO_FIRST_NAME varchar,
	BILL_TO_LAST_NAME varchar,
	SHIP_TO_FIRST_NAME varchar,
	SHIP_TO_LAST_NAME varchar,
	BILL_TO_TELEPHONE_TYPE varchar,
	BILL_TO_TELEPHONE_NUMBER varchar,
	SHIP_TO_NAME_TEXT varchar,
	SHIP_TO_ADDRESS_LINE1 varchar,
	SHIP_TO_COUNTRY_CODE varchar,
	SHIP_TO_CITY varchar,
	SHIP_TO_POSTAL_CODE varchar,
	SHIP_TO_STATE varchar,
	EMAIL_ADDRESS varchar,
	MESSAGE_TYPE varchar,
	FORMAT_VERSION varchar,
	CARD_TYPE_INFO2 varchar,
	SPECIAL_PAYMENT_TYPE_INDICATOR varchar,
	CRYPTOGRAM_TYPE varchar,
	INITIATION_INDICATOR varchar,
	ORIGINAL_DATA_REQUEST_INDICATOR varchar,
	ORIGINAL_VISA_TRANSACTION_ID varchar,
	SCHEDULE_INDICATOR varchar,
	STORED_CREDENTIAL_INDICATOR varchar,
	VISA_TRANSACTION_ID varchar,
	CURRENT_BALANCE_SIGN varchar,
	CURRENT_BALANCE_CURRENCY_CODE varchar,
	CASH_BACK_AMOUNT_REQUESTED varchar,
	CURRENCY_CODE varchar,
	CHIP_DATA varchar,
	ACCOUNT_TYPE_DEBIT varchar,
	ACCOUNT_TYPE_EBT varchar,
	VOUCHER_NUMBER varchar,
	PARTIAL_REDEMPTION_INDICATOR_GIFT varchar,
	CASH_BACK_AMOUNT_APPROVED varchar,
	CASH_BACK_AMOUNT varchar,
	FOOD_AND_CONSUMER_NUMBER varchar,
	QHP_AMOUNT varchar,
	RX_AMOUNT varchar,
	VISION_AMOUNT varchar,
	CLINIC_OTHER_AMOUNT varchar,
	DENTAL_AMOUNT varchar,
	DEVICE_TYPE varchar,
	PAYMENT_DEVICE varchar,
	POS_CAPABILITY_CODE varchar,
	POS_ENTRY_MODE varchar,
	POS_ENTRY_MODE_RESPONSE varchar,
	CHIP_DATA_RESPONSE varchar,
	BALANCE_TYPE1 varchar,
	BALANCE_TYPE2 varchar,
	BALANCE_TYPE3 varchar,
	BALANCE_TYPE4 varchar,
	BALANCE_TYPE5 varchar,
	BALANCE_TYPE6 varchar,
	BALANCE_AMOUNT1 varchar,
	BALANCE_AMOUNT2 varchar,
	BALANCE_AMOUNT3 varchar,
	BALANCE_AMOUNT4 varchar,
	BALANCE_AMOUNT5 varchar,
	BALANCE_AMOUNT6 varchar,
	PREVIOUS_BALANCE varchar,
	ORIGINAL_REFERENCE_NUMBER varchar,
	SUBTYPE_FLAG varchar,
	CARD_TYPE_INFO1 varchar,
	TRACE_NUMBER_RESPONSE varchar,
	TOKEN_ASSURANCE_LEVEL varchar,
	ACCOUNT_STATUS varchar,
	TOKEN_REQUESTOR_ID varchar,
	MERCHANT_CATEGORY_CODE varchar,
	MERCHANT_ID varchar,
	BILL_TO_FIRST_NAME varchar,
	BILL_TO_LAST_NAME varchar,
	SHIP_TO_FIRST_NAME varchar,
	SHIP_TO_LAST_NAME varchar,
	BILL_TO_TELEPHONE_TYPE varchar,
	BILL_TO_TELEPHONE_NUMBER varchar,
	SHIP_TO_NAME_TEXT varchar,
	SHIP_TO_ADDRESS_LINE1 varchar,
	SHIP_TO_COUNTRY_CODE varchar,
	SHIP_TO_CITY varchar,
	SHIP_TO_POSTAL_CODE varchar,
	SHIP_TO_STATE varchar,
	EMAIL_ADDRESS varchar,
	MESSAGE_TYPE varchar,
	FORMAT_VERSION varchar,
	CARD_TYPE_INFO2 varchar,
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	CHARGE_TRANSACTION_FK bigint(20),
	RETAIL_TRANSACTION_CYCLE_FK bigint(20),
	CHARGE_TRANSACTION_FK bigint(20),
	CAVV_RESPONSE_CODE varchar,
	AUTH_MID varchar,
	CAVV_RESPONSE_CODE varchar,
	AUTH_MID varchar,
	AUTH_MID varchar,
	PRIMARY KEY (ID)
) ENGINE=InnoDB;