Merge branch 'dev' into 8657-app-status-pdf
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-02-25 06:15:56 +00:00
commit f2421c806a
3 changed files with 18 additions and 1 deletions

View File

@ -24,7 +24,7 @@
"relations": { "relations": {
"agency": { "agency": {
"type": "belongsTo", "type": "belongsTo",
"model": "WorkCenter", "model": "Agency",
"foreignKey": "agencyFk" "foreignKey": "agencyFk"
}, },
"workCenter": { "workCenter": {

View File

@ -0,0 +1,8 @@
UPDATE vn.claimEnd ce
JOIN(
SELECT id
FROM vn.claimEnd
WHERE claimDestinationFk NOT IN
(SELECT id FROM vn.claimDestination WHERE id IS NOT NULL)
) s ON ce.id = s.id
SET ce.claimDestinationFk = 1;

View File

@ -0,0 +1,9 @@
ALTER TABLE vn.claimEnd
MODIFY COLUMN claimDestinationFk tinyint(3) unsigned NOT NULL DEFAULT 1;
ALTER TABLE vn.claimEnd
ADD CONSTRAINT fk_claimEnd_claimDestination
FOREIGN KEY (claimDestinationFk)
REFERENCES claimDestination(id)
ON UPDATE CASCADE
ON DELETE RESTRICT;