Class AddForeignKeyCommand
- java.lang.Object
-
- com.atlassian.confluence.upgrade.ddl.AddForeignKeyCommand
-
- All Implemented Interfaces:
AlterTableCommand
public class AddForeignKeyCommand extends Object implements AlterTableCommand
A command for creating a named foreign key constraint between two columns
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddForeignKeyCommand
createCommand(String constraintName, String sourceColumn, String destinationTable, String destinationColumn)
String
getCommandName()
String
getCommandParameters()
-
-
-
Method Detail
-
createCommand
public static AddForeignKeyCommand createCommand(String constraintName, String sourceColumn, String destinationTable, String destinationColumn)
-
getCommandName
public String getCommandName()
- Specified by:
getCommandName
in interfaceAlterTableCommand
- Returns:
- The keyword/name of the current command for the current database (e.g. altering a column is "alter column" on PostgreSQL and "modify" on MySQL.
-
getCommandParameters
public String getCommandParameters()
- Specified by:
getCommandParameters
in interfaceAlterTableCommand
- Returns:
- The part that comes after the command name. E.g. "colname set not null" which would be after "alter column colname set not null"
-
-