<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Possible to create duplicate Avro Schemas in the Schema Registry in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Possible-to-create-duplicate-Avro-Schemas-in-the-Schema/m-p/202708#M164714</link>
    <description>&lt;P&gt;Thanks.  I gave it a try.  The SQL script now runs correctly.  However when I try to create add a new schema I see this error in the registry.log file:&lt;/P&gt;&lt;P&gt;ERROR  [13:21:06.461] [dw-27 - POST /api/v1/schemaregistry/schemas] c.h.r.s.w.SchemaRegistryResource -  Error encountered while adding schema info [SchemaMetadata{type='avro', schemaGroup='sales-nxt-email', name='test', description='test', compatibility=BACKWARD, evolve=true}]&lt;BR /&gt;com.hortonworks.registries.storage.exception.StorageException: org.postgresql.util.PSQLException: ERROR: null value in column "validationLevel" violates not-null constraint&lt;BR /&gt;  Detail: Failing row contains (2, avro, sales-nxt-email, test, BACKWARD, null, test, t, 1502734866442).&lt;BR /&gt;  at com.hortonworks.registries.storage.impl.jdbc.provider.sql.factory.AbstractQueryExecutor$QueryExecution.executeUpdate(AbstractQueryExecutor.java:225)&lt;BR /&gt;  at com.hortonworks.registries.storage.impl.jdbc.provider.sql.factory.AbstractQueryExecutor.executeUpdate(AbstractQueryExecutor.java:182)&lt;BR /&gt;  at com.hortonworks.registries.storage.impl.jdbc.provider.postgresql.factory.PostgresqlExecutor.insertOrUpdateWithUniqueId(PostgresqlExecutor.java:182)&lt;BR /&gt;  at com.hortonworks.registries.storage.impl.jdbc.provider.postgresql.factory.PostgresqlExecutor.insert(PostgresqlExecutor.java:80)&lt;BR /&gt;  at com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager.add(JdbcStorageManager.java:66)&lt;BR /&gt;  at com.hortonworks.registries.schemaregistry.DefaultSchemaRegistry.addSchemaMetadata(DefaultSchemaRegistry.java:168)&lt;BR /&gt;  at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.lambda$addSchemaInfo$1(SchemaRegistryResource.java:380)&lt;BR /&gt;  at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.handleLeaderAction(SchemaRegistryResource.java:158)&lt;BR /&gt;  at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.addSchemaInfo(SchemaRegistryResource.java:371)&lt;BR /&gt;  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;BR /&gt;  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;  at java.lang.reflect.Method.invoke(Method.java:498)&lt;/P&gt;&lt;P&gt;Looking at the create_tables.sql script for the schema_metadata_info table it appears there is a new column called "validationLevel" that is not in the original script that was used to install schema registry.  Should this column allow nulls?&lt;/P&gt;&lt;P&gt;--New Script&lt;/P&gt;&lt;P&gt;CREATE TABLE IF NOT EXISTS schema_metadata_info (&lt;BR /&gt;&lt;BR /&gt;  "id"  SERIAL UNIQUE NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  "type"  VARCHAR(255) NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  "schemaGroup"  VARCHAR(255) NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  "name"  VARCHAR(255) NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  "compatibility"  VARCHAR(255) NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  &lt;EM&gt;&lt;STRONG&gt;"validationLevel" VARCHAR(255) NOT NULL, -- added in 0.3.1, table should be altered to add this column from earlier versions.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;  "description"  TEXT,&lt;BR /&gt;&lt;BR /&gt;  "evolve"  BOOLEAN  NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  "timestamp"  BIGINT  NOT NULL,&lt;BR /&gt;&lt;BR /&gt;  PRIMARY KEY ( "name"),&lt;BR /&gt;&lt;BR /&gt;  UNIQUE ("id")&lt;BR /&gt;&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;--Script which was originally used to install Schema Registry&lt;/P&gt;&lt;P&gt;CREATE TABLE IF NOT EXISTS schema_metadata_info (&lt;BR /&gt;  "id"  SERIAL PRIMARY KEY,&lt;BR /&gt;  "type"  VARCHAR(256)  NOT NULL,&lt;BR /&gt;  "schemaGroup"  VARCHAR(256)  NOT NULL,&lt;BR /&gt;  "name"  VARCHAR(256)  NOT NULL,&lt;BR /&gt;  "compatibility" VARCHAR(256)  NOT NULL,&lt;BR /&gt;  "description"  TEXT,&lt;BR /&gt;  "evolve"  BOOLEAN  NOT NULL,&lt;BR /&gt;  "timestamp"  BIGINT  NOT NULL,&lt;BR /&gt;  UNIQUE("id","name")&lt;BR /&gt;);&lt;/P&gt;</description>
    <pubDate>Tue, 15 Aug 2017 01:27:14 GMT</pubDate>
    <dc:creator>kirk_demumbrane</dc:creator>
    <dc:date>2017-08-15T01:27:14Z</dc:date>
  </channel>
</rss>

