refs #4927 unique key added
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2022-12-27 10:26:56 +01:00
parent c13b49c7cd
commit 5eda1388ef
4 changed files with 3 additions and 6 deletions

View File

@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
-
-
### Changed
-
- Se permite añadir Proveedores con la misma razón social pero con países distintos

View File

@ -0,0 +1 @@
ALTER TABLE `vn`.`supplier` ADD UNIQUE (name, countryFk);

View File

@ -16,10 +16,6 @@ module.exports = Self => {
message: 'The social name cannot be empty'
});
Self.validatesUniquenessOf('name', {
message: 'The supplier name must be unique'
});
if (this.city) {
Self.validatesPresenceOf('city', {
message: 'City cannot be empty'