Project

General

Profile

« Previous | Next » 

Revision 0f9d4e5a

Added by Andreas Müller over 10 years ago

Allow access to hibernate dialect via DatabaseTypeEnum, use this for foreign key handling in TableCreator and ColumnAdder/Changer

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/ColumnAdder.java
96 96
				datasource.executeUpdate(updateQuery);
97 97
			}
98 98
			if (referencedTable != null){
99
				result &= TableCreator.makeForeignKey(tableName, datasource, newColumnName, referencedTable);
99
				result &= TableCreator.makeForeignKey(tableName, datasource, monitor, newColumnName, referencedTable);
100 100
			}
101 101
			
102 102
			return result;
......
158 158
	}
159 159
	
160 160

  
161
	/**
162
	 * Returns the sql keywords for adding a column. This is usually 'ADD' or 'ADD COLUMN'
163
	 * @param datasource
164
	 * @return
165
	 * @throws DatabaseTypeNotSupportedException
166
	 */
161 167
	public static String getAddColumnSeperator(ICdmDataSource datasource) throws DatabaseTypeNotSupportedException {
162 168
		DatabaseTypeEnum type = datasource.getDatabaseType();
163 169
		if (type.equals(DatabaseTypeEnum.SqlServer2005)){

Also available in: Unified diff