diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 96cb7128..0dfd3cec 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -421,7 +421,7 @@ type TSQLSpecifityId = (spDatabaseTable, spDatabaseTableId, spDatabaseDrop, spDbObjectsTable, spDbObjectsCreateCol, spDbObjectsUpdateCol, spDbObjectsTypeCol, spEmptyTable, spRenameTable, spRenameView, spCurrentUserHost, spLikeCompare, - spAddColumn, spChangeColumn, spRenameColumn, + spAddColumn, spChangeColumn, spRenameColumn, spForeignKeyEventAction, spGlobalStatus, spCommandsCounters, spSessionVariables, spGlobalVariables, spISSchemaCol, spUSEQuery, spKillQuery, spKillProcess, @@ -3033,6 +3033,7 @@ begin FSQLSpecifities[spOrderAsc] := 'ASC'; FSQLSpecifities[spOrderDesc] := 'DESC'; + FSQLSpecifities[spForeignKeyEventAction] := 'RESTRICT,CASCADE,SET NULL,NO ACTION'; case Parameters.NetTypeGroup of ngMySQL: begin @@ -3107,6 +3108,7 @@ begin FSQLSpecifities[spAddColumn] := 'ADD %s'; FSQLSpecifities[spChangeColumn] := 'ALTER COLUMN %s %s'; FSQLSpecifities[spRenameColumn] := 'RENAME COLUMN %s TO %s'; + FSQLSpecifities[spForeignKeyEventAction] := 'RESTRICT,CASCADE,SET NULL,NO ACTION,SET DEFAULT'; FSQLSpecifities[spSessionVariables] := 'SHOW ALL'; FSQLSpecifities[spGlobalVariables] := FSQLSpecifities[spSessionVariables]; FSQLSpecifities[spISSchemaCol] := '%s_schema'; diff --git a/source/table_editor.pas b/source/table_editor.pas index ef54c383..7608231c 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -2645,7 +2645,7 @@ begin end; 4, 5: begin EnumEditor := TEnumEditorLink.Create(VT, True, nil); - EnumEditor.ValueList.Text := 'RESTRICT'+CRLF+'CASCADE'+CRLF+'SET NULL'+CRLF+'NO ACTION'; + EnumEditor.ValueList := Explode(',', DBObject.Connection.GetSQLSpecifity(spForeignKeyEventAction)); EditLink := EnumEditor; end; end;