This commit is contained in:
parent
dce5394cb9
commit
0a78dd344f
|
@ -1,13 +1,25 @@
|
||||||
-- vn.supplierAccountContry definition
|
CREATE TABLE `supplierAccount` (
|
||||||
|
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
CREATE TABLE `supplierAccountCountry` (
|
`supplierFk` int(11) DEFAULT NULL,
|
||||||
`supplierAccountFk` mediumint(8) unsigned NOT NULL,
|
`iban` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||||
`companyFk` int(11) DEFAULT NULL,
|
`office` varchar(4) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||||
`countryFk` mediumint(8) unsigned NOT NULL,
|
`DC` varchar(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||||
PRIMARY KEY (`supplierAccountFk`),
|
`number` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||||
UNIQUE KEY `countryFk` (`countryFk`),
|
`description__` varchar(45) DEFAULT NULL COMMENT '@deprecated 2023-03-23',
|
||||||
UNIQUE KEY `companyFk` (`companyFk`),
|
`bankEntityFk` int(10) unsigned DEFAULT NULL,
|
||||||
CONSTRAINT `companyFk_supplier` FOREIGN KEY (`companyFk`) REFERENCES `supplierAccount` (`supplierFk`) ON UPDATE CASCADE,
|
`accountingFk` int(11) DEFAULT NULL,
|
||||||
CONSTRAINT `countryFk_id` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
|
`beneficiary` varchar(50) DEFAULT NULL,
|
||||||
CONSTRAINT `supplierAccountFk_id` FOREIGN KEY (`supplierAccountFk`) REFERENCES `supplierAccount` (`id`) ON UPDATE CASCADE
|
`editorFk` int(10) unsigned DEFAULT NULL,
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
`countryFk` int(10) unsigned UNIQUE KEY,
|
||||||
|
`companyFk` int(10) unsigned UNIQUE KEY,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `fk_proveedores_proveedores_account_idx` (`supplierFk`),
|
||||||
|
KEY `fk_Proveedores_account_entity1_idx` (`bankEntityFk`),
|
||||||
|
KEY `fk_banco_prov_account_idx` (`accountingFk`),
|
||||||
|
KEY `supplierAccount_fk_editor` (`editorFk`),
|
||||||
|
CONSTRAINT `supplierAccount_FK` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `supplierAccount_FK_1` FOREIGN KEY (`bankEntityFk`) REFERENCES `bankEntity` (`id`) ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `supplierAccount_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
|
||||||
|
CONSTRAINT `supplierAccount_FK_country` FOREIGN KEY (`countryFk`) REFERENCES `vn`.`country` (`id`),
|
||||||
|
CONSTRAINT `supplierAccount_FK_company` FOREIGN KEY (`companyFk`) REFERENCES `vn`.`company` (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=242 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE vn.supplier ADD defaultAccountFk varchar(100) DEFAULT NULL NULL;
|
|
Loading…
Reference in New Issue