1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-26 07:44:02 +01:00

Miglioria controllo su chiavi esterne

This commit is contained in:
Pek5892 2023-11-03 15:38:11 +01:00
parent 8fe7b769c8
commit 22bfae0c0f

View File

@ -392,8 +392,8 @@ class Update
KEY_COLUMN_USAGE.COLUMN_NAME AS `column`,
KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME AS `referenced_table`,
KEY_COLUMN_USAGE.REFERENCED_COLUMN_NAME AS `referenced_column`,
DELETE_RULE AS `delete_rule`,
UPDATE_RULE AS `update_rule`
IF(DELETE_RULE=\'NO ACTION\', \'RESTRICT\', DELETE_RULE) AS `delete_rule`,
IF(UPDATE_RULE=\'NO ACTION\', \'RESTRICT\', UPDATE_RULE) AS `update_rule`
FROM information_schema.KEY_COLUMN_USAGE INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS ON (information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME = information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME AND information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA = information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA)
WHERE KEY_COLUMN_USAGE.TABLE_NAME = '.prepare($table).'
AND TABLE_SCHEMA = '.prepare($database_name).'