Преглед изворни кода

AMBARI-11817 [WinTP2] Adding a view fails on Windows

Fixed database column description in ViewInstanceEntity and UpgradeCatalog210
Florian Barca пре 10 година
родитељ
комит
1f371a592d

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java

@@ -282,7 +282,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog {
     // determine whether to alter the names of the dynamic entities / attributes to
     // avoid db reserved word conflicts.  should be false for existing instances
     // for backward compatibility.
-    dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, null, 0, false));
+    dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, 0, 0, false));
     // cluster configuration
     dbAccessor.addColumn(VIEW_PARAMETER_TABLE, new DBColumnInfo("cluster_config", String.class, 255, null, true));
     // view build number

+ 1 - 1
ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql

@@ -537,7 +537,7 @@ CREATE TABLE viewinstanceproperty (
   view_name VARCHAR(255) NOT NULL,
   view_instance_name VARCHAR(255) NOT NULL,
   NAME VARCHAR(255) NOT NULL,
-  value VARCHAR(2000) NOT NULL,
+  value VARCHAR(2000),
   PRIMARY KEY CLUSTERED (
     view_name,
     view_instance_name,