* Fixed import of view.
This commit is contained in:
parent
a00119f209
commit
333d73e8fd
|
@ -238,7 +238,9 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recreateColumn || syncDatabase) {
|
if (recreateColumn || syncDatabase) {
|
||||||
success = createColumn(ctx, m_Column, recreateColumn);
|
MTable table = new MTable(ctx, m_Column.getAD_Table_ID(), getTrxName(ctx));
|
||||||
|
if (!table.isView()) {
|
||||||
|
success = createColumn(ctx, table, m_Column, recreateColumn);
|
||||||
|
|
||||||
if (success == 1) {
|
if (success == 1) {
|
||||||
record_log(ctx, 1, m_Column.getColumnName(), "dbColumn",
|
record_log(ctx, 1, m_Column.getColumnName(), "dbColumn",
|
||||||
|
@ -255,6 +257,7 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
throw new DatabaseAccessException("Failed to create column or related constraint for " + m_Column.getColumnName());
|
throw new DatabaseAccessException("Failed to create column or related constraint for " + m_Column.getColumnName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
element.skip = true;
|
element.skip = true;
|
||||||
}
|
}
|
||||||
|
@ -271,10 +274,7 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
* @param v_IsMandatory
|
* @param v_IsMandatory
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private int createColumn(Properties ctx, MColumn column, boolean doAlter) {
|
private int createColumn(Properties ctx, MTable table, MColumn column, boolean doAlter) {
|
||||||
MTable table = new MTable(ctx, column.getAD_Table_ID(), getTrxName(ctx));
|
|
||||||
if (table.isView())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
int no = 0;
|
int no = 0;
|
||||||
|
|
||||||
|
@ -328,6 +328,8 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
if (sql.indexOf(DB.SQLSTATEMENT_SEPARATOR) == -1) {
|
if (sql.indexOf(DB.SQLSTATEMENT_SEPARATOR) == -1) {
|
||||||
no = DB.executeUpdate(sql, false, getTrxName(ctx));
|
no = DB.executeUpdate(sql, false, getTrxName(ctx));
|
||||||
|
if (no == -1)
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
String statements[] = sql.split(DB.SQLSTATEMENT_SEPARATOR);
|
String statements[] = sql.split(DB.SQLSTATEMENT_SEPARATOR);
|
||||||
for (int i = 0; i < statements.length; i++) {
|
for (int i = 0; i < statements.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue