This commit is contained in:
parent
7fd87c4b04
commit
de7b270d9e
|
@ -1,10 +0,0 @@
|
|||
-- vn.accountCountry definition
|
||||
|
||||
CREATE TABLE `vn`.`accountCountry` (
|
||||
`supplierAccountFk` mediumint(8) unsigned DEFAULT NULL,
|
||||
`countryFk` mediumint(8) unsigned DEFAULT NULL,
|
||||
KEY `supplierAccountFk` (`supplierAccountFk`),
|
||||
KEY `countryFk` (`countryFk`),
|
||||
CONSTRAINT `accountCountry_ibfk_1` FOREIGN KEY (`supplierAccountFk`) REFERENCES `supplierAccount` (`id`),
|
||||
CONSTRAINT `accountCountry_ibfk_2` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
|
@ -0,0 +1,13 @@
|
|||
-- vn.supplierAccountContry definition
|
||||
|
||||
CREATE TABLE `supplierAccountCountry` (
|
||||
`supplierAccountFk` mediumint(8) unsigned NOT NULL,
|
||||
`companyFk` int(11) DEFAULT NULL,
|
||||
`countryFk` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`supplierAccountFk`),
|
||||
UNIQUE KEY `countryFk` (`countryFk`),
|
||||
UNIQUE KEY `companyFk` (`companyFk`),
|
||||
CONSTRAINT `companyFk_supplier` FOREIGN KEY (`companyFk`) REFERENCES `supplierAccount` (`supplierFk`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `countryFk_id` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `supplierAccountFk_id` FOREIGN KEY (`supplierAccountFk`) REFERENCES `supplierAccount` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.supplier ADD defaultAccountFk varchar(100) DEFAULT NULL NULL;
|
Loading…
Reference in New Issue