0

As the question says, i create, delete columns from tables in my development server, after i finish all changes, i will like to apply the news columns created or deleted on development server to production server, problem is, how to only update changes of table structures only without affecting production server data(where its not necessary).

What i have tried is, if in development server i create x column on y table, then i have to manually create or delete all those columns on production server.

0

1 Answer 1

1

You should/can create a file migration.sql with your sql-statements regarding the schema-migration.

There are several migration-techniques which might fit your needs. It is always needed to take care about a fallback/rollback mechanism if sthg is failing.

Possibilities are:

  • working with temp-tables and copying.
  • data processing to the new schema on the fly

Prepare your backup!

Have a look at e.g.: https://flywaydb.org/

Sign up to request clarification or add additional context in comments.

1 Comment

Found some answers here, thanks. stackoverflow.com/questions/4580417/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.