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

Files in schema model having different extensions

For an Oracle database, I am exporting the DDL and saving the files into my schema-model.  Is it possible to use files with extension other than .sql (e.g. .prc for procedures, .trg for triggers, .pkg for packages, etc)?

Brian
0

Comments

1 comment

  • Jon Kirkwood
    Official comment

    Hi Brian 

    Thank you for reaching out on the Redgate forums with your Flyway extension inquiry. 

    Yes, this may be supported in Flyway for your requirements.

     

    By default, Flyway scans for .sql file types to read in for migrations.

    However, you can configure additional suffixes using the flyway.sqlMigrationSuffixes setting, for example:

    flyway.sqlMigrationSuffixes=.sql,.pkg,.pkb,.prc,.trg

    Documentation:
    https://documentation.red-gate.com/flyway/reference/configuration/flyway-namespace/flyway-sql-migration-suffixes-setting

     

    That said, while it’s possible, it does add complexity. 

    All environments (developers, CI, build agents) would need to use the same configuration, and it moves away from Flyway’s default conventions.

     

    Flyway determines object type from the SQL inside the file (not the extension), which means in most cases, keeping everything as .sql is the simpler and more maintainable approach.

     

    The sqlMigrationSuffixes setting is not maintained through Flyway Desktop. You would need to modify your configuration file directly. 

    Information on the expected layout of this field can be found on the link provided above.

     

    Hope this helps with your project and filetype naming.

    Jon Kirkwood

Add comment

Please sign in to leave a comment.