Class EnablePgTrgmExtensionMigration

java.lang.Object
db.migration.EnablePgTrgmExtensionMigration
All Implemented Interfaces:
org.flywaydb.core.api.migration.JavaMigration

public class EnablePgTrgmExtensionMigration extends Object implements org.flywaydb.core.api.migration.JavaMigration
Enables the PostgreSQL pg_trgm extension when the active database supports it.
Version:
1.0.8
Author:
Stephen Prizio
  • Constructor Details

    • EnablePgTrgmExtensionMigration

      public EnablePgTrgmExtensionMigration()
  • Method Details

    • getVersion

      public org.flywaydb.core.api.MigrationVersion getVersion()
      Returns the Flyway version for this migration.
      Specified by:
      getVersion in interface org.flywaydb.core.api.migration.JavaMigration
    • getDescription

      public String getDescription()
      Returns the Flyway description for this migration.
      Specified by:
      getDescription in interface org.flywaydb.core.api.migration.JavaMigration
    • getChecksum

      public Integer getChecksum()
      Returns the checksum for this migration.
      Specified by:
      getChecksum in interface org.flywaydb.core.api.migration.JavaMigration
    • canExecuteInTransaction

      public boolean canExecuteInTransaction()
      Indicates this migration should execute outside a transaction.
      Specified by:
      canExecuteInTransaction in interface org.flywaydb.core.api.migration.JavaMigration
    • migrate

      public void migrate(org.flywaydb.core.api.migration.Context context) throws Exception
      Enables the pg_trgm extension for PostgreSQL databases.
      Specified by:
      migrate in interface org.flywaydb.core.api.migration.JavaMigration
      Throws:
      Exception