Package org.pgcodekeeper.core.utils
Class ProjectUpdater
java.lang.Object
org.pgcodekeeper.core.utils.ProjectUpdater
Database project update and export management utility.
Handles partial and full updates of database projects with safe backup and restore functionality.
Supports overrides-only updates and manages temporary directories for safe atomic operations.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectUpdater(AbstractDatabase dbNew, AbstractDatabase dbOld, Collection<TreeElement> changedObjects, DatabaseType dbType, String encoding, Path dirExport, boolean overridesOnly, ISettings settings) Creates a new project updater with specified configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateFull(boolean projectOnly) Performs full update of database project.voidPerforms partial update of database project.
-
Constructor Details
-
ProjectUpdater
public ProjectUpdater(AbstractDatabase dbNew, AbstractDatabase dbOld, Collection<TreeElement> changedObjects, DatabaseType dbType, String encoding, Path dirExport, boolean overridesOnly, ISettings settings) Creates a new project updater with specified configuration.- Parameters:
dbNew- the new database schemadbOld- the old database schema for comparisonchangedObjects- collection of changed tree elementsdbType- the database typeencoding- the file encoding to usedirExport- the export directory pathoverridesOnly- whether to update only overridessettings- the application settings
-
-
Method Details
-
updatePartial
Performs partial update of database project. Updates only changed objects with safe backup and restore on failure.- Throws:
IOException- if update operation fails
-
updateFull
Performs full update of database project. Completely regenerates project structure with optional overrides preservation.- Parameters:
projectOnly- whether to preserve overrides directory during update- Throws:
IOException- if update operation fails
-