pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Abhra Kar <abhra.kar@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Found non-empty schema without metadata table error while migrating
Date: Tue, 6 Feb 2018 08:38:40 -0800
Message-ID: <94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com> (raw)
In-Reply-To: <CAFNULEd-KOWBeq4uy_RC+=K2311uBKYunKwTgLF4PjbvYiNUBQ@mail.gmail.com>
References: <CAFNULEd-KOWBeq4uy_RC+=K2311uBKYunKwTgLF4PjbvYiNUBQ@mail.gmail.com>

On 02/05/2018 10:52 PM, Abhra Kar wrote:
> Hi,
> 
> Getting below error—
> 
> 
> exec] Flyway (Command-line Tool) v.1.1
> 
> [exec]
> 
> [exec] Metadata table created: schema_version
> 
> [exec] Schema initialized with version: 0
> 
> [exec] Flyway (Command-line Tool) v.1.1
> 
> [exec]
> 
> [exec] ValidationException: Found non-empty schema without metadata 
> table! Use init() first to initialise the metadata table.

Did you do the above?

The below seems to be a question for the Flyway folks. They don't seem 
to have a mailing list, they do point at a SO page:

https://stackoverflow.com/questions/tagged/flyway

> 
> 
> It stuck when going to execute below configuration in ant build.xml for 
> migrate db(populate tables into schema abc)—
> 
> 
> <exec executable="./${flyway_sh}" dir="flyway-commandline-1.1">
> 
> <arg value="-driver=${flyway_driver}" />
> 
> <arg value="-url=${jdbc_db_url}" />
> 
> <arg value="-user=${xxxx.username}" />
> 
> <arg value="-password=${xxxx.password}" />
> 
> <!-- <arg value="-Dflyway.baselineOnMigrate='true'" />-->
> 
> <arg value="init" />
> 
> <arg value="-Dflyway.initialVersion=xxxxxx” />
> 
> <arg value="-Dflyway.initialDescription='Base version'" />
> 
> </exec>
> 
> <exec executable="./${flyway_sh}" dir="flyway-commandline-1.1" 
> failonerror="true">
> 
> <arg value="-driver=${flyway_driver}" />
> 
> <arg value="-url=${jdbc_db_url}" />
> 
> <arg value="-user=${xxxx.username}" />
> 
> <arg value="-password=${xxxx.password}" />
> 
> <arg value="-Dflyway.schemas=‘abc'" />
> 
> <arg value="migrate" />
> 
> </exec>
> 
> 
> abc schema is created properly registered with abc user.
> 
> 
> <arg value="-Dflyway.baselineOnMigrate='true'" /> didn’t solve the problem
> 
> 
> What need to be change here.


> 
> 
> Thanks
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (2+ messages)

Message-ID: <94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com>
Permalink:  ../94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com/
Also on:    postgresql.org/message-id/94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, abhra.kar@gmail.com
  Subject: Re: Found non-empty schema without metadata table error while migrating
  In-Reply-To: <94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com>
  References: <CAFNULEd-KOWBeq4uy_RC+=K2311uBKYunKwTgLF4PjbvYiNUBQ@mail.gmail.com> <94c8d7c6-badd-5447-b73f-af837b9e1e53@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox