class ChangedPrimaryKeyChangeGenerator extends AbstractChangeGenerator implements ChangedObjectChangeGenerator {
    @Override
    public int getPriority(Class<? extends DatabaseObject> objectType, Database database) {
        if (PrimaryKey.class.isAssignableFrom(objectType)) {
            return PRIORITY_DEFAULT;
        }
        return PRIORITY_NONE;
    }

    @Override
    public Class<? extends DatabaseObject>[] runBeforeTypes() {
        return new Class[] {Index.class, UniqueConstraint.class };
    }

    @Override
    public Class<? extends DatabaseObject>[] runAfterTypes() {
        return null;
    }

    @Override
    public Change[] fixChanged(DatabaseObject changedObject, ObjectDifferences differences, DiffOutputControl control, Database referenceDatabase, Database comparisonDatabase, ChangeGeneratorChain chain) {<FILL_FUNCTION_BODY>}
}


        //don't try to recreate PKs that differ in just clustered
        Difference clusteredDiff = differences.getDifference("clustered");
        if (clusteredDiff != null) {
            if ((clusteredDiff.getReferenceValue() == null) || (clusteredDiff.getComparedValue() == null)) {
                differences.removeDifference("clustered");
            }
        }
        if (!differences.hasDifferences()) {
            return EMPTY_CHANGE;
        }

        PrimaryKey pk = (PrimaryKey) changedObject;

        List<Change> returnList = new ArrayList<>();


        DropPrimaryKeyChange dropPkChange = new DropPrimaryKeyChange();
        dropPkChange.setTableName(pk.getTable().getName());
        returnList.add(dropPkChange);

        AddPrimaryKeyChange addPkChange = new AddPrimaryKeyChange();
        addPkChange.setTableName(pk.getTable().getName());
        addPkChange.setColumnNames(pk.getColumnNames());
        addPkChange.setConstraintName(pk.getName());

        if (comparisonDatabase instanceof OracleDatabase) {
            Index backingIndex = pk.getBackingIndex();
            if ((backingIndex != null) && (backingIndex.getName() != null)) {
                Change[] indexChanges = ChangeGeneratorFactory.getInstance().fixMissing(backingIndex, control, referenceDatabase, comparisonDatabase);
                if (indexChanges != null) {
                    returnList.addAll(Arrays.asList(indexChanges));
                }

                addPkChange.setForIndexName(backingIndex.getName());
                Schema schema = backingIndex.getSchema();
                if (schema != null) {
                    if (control.getIncludeCatalog()) {
                        addPkChange.setForIndexCatalogName(schema.getCatalogName());
                    }
                    if (control.getIncludeSchema()) {
                        addPkChange.setForIndexSchemaName(schema.getName());
                    }
                }
            }
        }
        returnList.add(addPkChange);

        if (control.getIncludeCatalog()) {
            dropPkChange.setCatalogName(pk.getSchema().getCatalogName());
            addPkChange.setCatalogName(pk.getSchema().getCatalogName());
        }
        if (control.getIncludeSchema()) {
            dropPkChange.setSchemaName(pk.getSchema().getName());
            addPkChange.setSchemaName(pk.getSchema().getName());
        }

        Difference columnDifferences = differences.getDifference("columns");
        List<Column> referenceColumns;
        List<Column> comparedColumns;
        if (columnDifferences == null) {
            referenceColumns = pk.getColumns();
            comparedColumns = pk.getColumns();
        } else {
            referenceColumns = (List<Column>) columnDifferences.getReferenceValue();
            comparedColumns = (List<Column>) columnDifferences.getComparedValue();
        }

        StringUtil.ToStringFormatter formatter = new StringUtil.ToStringFormatter();

        control.setAlreadyHandledChanged(new Index().setRelation(pk.getTable()).setColumns(referenceColumns));
        if (!StringUtil.join(referenceColumns, ",", formatter).equalsIgnoreCase(StringUtil.join(comparedColumns, ",", formatter))) {
            control.setAlreadyHandledChanged(new Index().setRelation(pk.getTable()).setColumns(comparedColumns));
        }

        control.setAlreadyHandledChanged(new UniqueConstraint().setRelation(pk.getTable()).setColumns(referenceColumns));
        if (!StringUtil.join(referenceColumns, ",", formatter).equalsIgnoreCase(StringUtil.join(comparedColumns, "," , formatter))) {
            control.setAlreadyHandledChanged(new UniqueConstraint().setRelation(pk.getTable()).setColumns(comparedColumns));
        }

        return returnList.toArray(EMPTY_CHANGE);
    
<methods>public non-sealed void <init>() ,public liquibase.change.Change[] fixOutputAsSchema(liquibase.change.Change[], liquibase.diff.compare.CompareControl.SchemaComparison[]) ,public liquibase.change.Change[] fixSchema(liquibase.change.Change[], liquibase.diff.compare.CompareControl.SchemaComparison[]) ,public void setRespectSchemaAndCatalogCase(boolean) <variables>private boolean respectSchemaAndCatalogCase