diff --git a/db/changes/10480-june/00-shelving.sql b/db/changes/10480-june/00-shelving.sql index 045698e8f..c66d164c4 100644 --- a/db/changes/10480-june/00-shelving.sql +++ b/db/changes/10480-june/00-shelving.sql @@ -12,3 +12,7 @@ ALTER TABLE `vn`.`itemShelving` ADD CONSTRAINT itemShelving_fk2 FOREIGN KEY (she ALTER TABLE `vn`.`shelvingLog` ADD CONSTRAINT shelvingLog_FK_ibfk_1 FOREIGN KEY (originFk) REFERENCES `vn`.`shelving`(code) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `vn`.`smartTag` ADD CONSTRAINT smartTag_FK FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE; ALTER TABLE `vn`.`workerShelving` ADD CONSTRAINT workerShelving_FK_1 FOREIGN KEY (shelvingFk) REFERENCES `vn`.`shelving`(code) ON DELETE RESTRICT ON UPDATE CASCADE; + +ALTER TABLE vn.shelvingLog DROP FOREIGN KEY shelvingLog_FK_ibfk_1; +ALTER TABLE vn.shelvingLog MODIFY COLUMN originFk INT NOT NULL; +ALTER TABLE vn.shelvingLog ADD CONSTRAINT shelvingLog_FK FOREIGN KEY (originFk) REFERENCES vn.shelving(id) ON DELETE CASCADE ON UPDATE CASCADE; \ No newline at end of file diff --git a/modules/shelving/back/models/shelving-log.json b/modules/shelving/back/models/shelving-log.json index fd30d8be8..a2267394e 100644 --- a/modules/shelving/back/models/shelving-log.json +++ b/modules/shelving/back/models/shelving-log.json @@ -6,45 +6,45 @@ "table": "shelvingLog" } }, - "properties": { - "id": { - "id": true, - "type": "number", + "properties": { + "id": { + "id": true, + "type": "number", "forceId": false - }, - "originFk": { - "type": "string", - "required": true - }, - "userFk": { - "type": "number" - }, - "action": { - "type": "string", + }, + "originFk": { + "type": "number", "required": true - }, - "creationDate": { - "type": "date" - }, - "description": { - "type": "string" - }, - "changedModel": { - "type": "string" - }, - "oldInstance": { - "type": "string" - }, - "newInstance": { - "type": "string" - }, - "changedModelId": { - "type": "number" - }, - "changedModelValue": { - "type": "string" - } - }, + }, + "userFk": { + "type": "number" + }, + "action": { + "type": "string", + "required": true + }, + "changedModel": { + "type": "string" + }, + "oldInstance": { + "type": "object" + }, + "newInstance": { + "type": "object" + }, + "creationDate": { + "type": "date" + }, + "changedModelId": { + "type": "number" + }, + "changedModelValue": { + "type": "string" + }, + "description": { + "type": "string" + } + }, "relations": { "user": { "type": "belongsTo", diff --git a/modules/shelving/front/log/index.html b/modules/shelving/front/log/index.html index 6ea349316..8f0e6851c 100644 --- a/modules/shelving/front/log/index.html +++ b/modules/shelving/front/log/index.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file