/* **********************************************************
 * Copyright 2021 VMware, Inc.  All rights reserved. -- VMware Confidential
 * **********************************************************/

BEGIN;

ALTER TABLE NduTargetDeployment
    ADD COLUMN POSTGRES_VERSION INT;

/*
 * Holds information for source deployment
 */
CREATE TABLE NduSourceDeployment (
  UUID UUID REFERENCES NduUpgrade(UUID),
  POSTGRES_VERSION INT,
  PRIMARY KEY (UUID)
);

INSERT INTO UpgradeTracking VALUES(:ndu_id, :ndu_operation);
COMMIT;
