mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Support ON UPDATE SET DEFAULT and the same for ON DELETE in PostgreSQL foreign keys. See https://www.heidisql.com/forum.php?t=40413
This commit is contained in:
@ -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';
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user