db.migration.V1__init_table_creation.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tp-service Show documentation
Show all versions of tp-service Show documentation
Service that contains all Trading Partner Information
The newest version!
drop table if exists `tpdb`.`trading_partner_detail`;
CREATE TABLE IF NOT EXISTS `tpdb`.`trading_partner_detail` (
`trading_partner_sk` VARCHAR(36) NOT NULL COMMENT 'UUID will be the primary key',
`trading_partner_id` VARCHAR(45) NOT NULL COMMENT 'The id of the trading partner that is shared externally',
`name` VARCHAR(45) NULL COMMENT 'Name of the trading partner',
`description` VARCHAR(45) NULL COMMENT 'A short description about the trading partner',
`sender_id` VARCHAR(45) NOT NULL COMMENT 'The sender id that is associated with the trading partner',
`receiver_id` VARCHAR(45) NOT NULL COMMENT 'Receiver id associated with the trading partner',
`line_of_business_type_code` VARCHAR(45) NOT NULL COMMENT 'The line of business associated with the trading partner',
`business_unit_type_code` VARCHAR(50) NOT NULL COMMENT 'The trading partner’s business unit',
`state_type_code` VARCHAR(45) NOT NULL COMMENT 'The state associated with the trading partner',
`marketplace_type_code` VARCHAR(45) NOT NULL COMMENT 'The marketplace type code associated with the trading partner',
`created_date` DATETIME NOT NULL COMMENT 'Date of creation of the record',
`updated_date` DATETIME NOT NULL COMMENT 'Date that the record was updated',
PRIMARY KEY (`trading_partner_sk`),
UNIQUE INDEX `trading_partner_id_UNIQUE` (`trading_partner_id` ASC) VISIBLE)
ENGINE = InnoDB
COMMENT = 'This table will contain the details of a trading partner';