How can we help you today? How can we help you today?

Schema creating with old scripts

When executed flyway migrator with V1 sql scripts ,schema created in Postgres db.After that schema is deleted manually from pg admin and old db  V1 scripts are edited .Schema is creating with old V1sql script.How to fix this issue
Hima
0

Comments

2 comments

  • Peter_Laws
    Hello Hima, welcome!

    Assuming the schema definition isn't in your V1 script, what's most likely occurring is the schema is part of your flyway configuration.
    If flyway has schema defined that don't exist, it will attempt to create them as detailed here
    https://documentation.red-gate.com/flyway/flyway-cli-and-api/configuration/parameters/environments/schemas

    If that doesn't appear to be the case, please can you give a little more detail on the behaviour you're seeing?
    Peter_Laws
    0
  • starc01

    Flyway tracks migrations in the flyway_schema_history table. Since you manually deleted the schema, Flyway still sees V1 as applied. Try running flyway repair or incrementing the version (e.g., V2).

    starc01
    0

Add comment

Please sign in to leave a comment.