Package io.github.mfvanek.pg.generator
Class ForeignKeyMigrationGenerator
java.lang.Object
io.github.mfvanek.pg.generator.ForeignKeyMigrationGenerator
- All Implemented Interfaces:
DbMigrationGenerator<ForeignKey>
Migration generator for creating indexes covering foreign keys.
- Since:
- 0.5.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
generate
(StringBuilder queryBuilder, ForeignKey foreignKey) final String
generate
(List<ForeignKey> rows) Generates sql migration based on the specified rows.
-
Field Details
-
DELIMITER
- See Also:
-
-
Constructor Details
-
ForeignKeyMigrationGenerator
-
-
Method Details
-
generate
-
generate
Generates sql migration based on the specified rows.- Specified by:
generate
in interfaceDbMigrationGenerator<T extends TableNameAware>
- Parameters:
rows
- a set of data on the basis of which the sql migration will be generated- Returns:
- generated sql migration
-