Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Running multiple databases (mssql,postgreSql): Syntax error occurs for createIndex

$
0
0
Thanks in advance for any input. 

My company has an application that has been running on mssql and and the tests are run on H2 in memory, however we want to transition over to using postgreSql for our development environments.  The following works on mssql and H2 but fails for postgreSql
            
<createIndex indexName="idx_user_email"
      tableName="user"
              unique="true">
              <column name="email" type="varchar(100)"/>
         </createIndex>
         
With the error
      

         

            liquibase.exception.MigrationFailedException: Migration failed for change set classpath:config/liquibase/changelog/00000000000000_initial_schema.xml::00000000000001::valo:
            Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "."
            Position: 27 [Failed SQL: CREATE UNIQUE INDEX public.idx_user_login ON public.use(login)]
        
I know that PostgreSql does not like the schema being defined in the name of the index and the table but i cannot figure out how to be able to run the changeset without the schema name being included in the sql.
         
Application details:
Spring-boot 2;liquibase-core 3.5.3; liquibase-postgresql 3.0
   

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>