0

I am working on PostgreSQL database and after some months I have added new columns in many tables according to the new requirements on my test server and also I have done changes in functions.

Now what I want that I want to do same changes on my Live server without losing data.

I have taken backup on test server schema using below answer https://stackoverflow.com/a/7804825/7223676

Moin Khan
  • 674
  • 2
  • 9
  • 27
  • 1
    You need to run the same SQL script in production that you used in your test enviornment - hopefully that SQL script is stored in your source control system (giv, svn, ..). –  Oct 16 '19 at 07:25
  • I lost all the scripts which I have created – Moin Khan Oct 16 '19 at 07:25
  • PgAdmin 3 (as in your title) or PgAdmin 4 (as in your tags)? – Bergi Oct 16 '19 at 07:41
  • If you lost all scripts, then you need to do the following: 1. setup a proper source control system ("SCM", e.g. git) 2. setup a proper backup 3. use some kind of diff tool to find the differences between the two systems 4. validate the scripts 5. put those scripts into your SCM. 6. make sure you backup is working 6) apply the scripts to production. –  Oct 16 '19 at 08:08

0 Answers0