Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 296047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:30:46+00:00 2026-05-12T06:30:46+00:00

I was wondering how/if people have worked around db schema changes that would otherwise

  • 0

I was wondering how/if people have worked around db schema changes that would otherwise cause a production system to be down. It seems with additive changes that are constrained in some way (e.g. unique constraint) would be difficult to do b/c the app and the db must change at the same time otherwise errors will occur either in the data or in the application.

I have thought about maybe switching to a slave db (using mysql replication) and running the schema changes on the master but then you would need to somehow capture the update queries applied to the slave that where not applied to the master and you would run the risk of not having a backup server.

What techniques have people used to work around these problems?

Thanks,
manish

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:30:47+00:00Added an answer on May 12, 2026 at 6:30 am

    I’d say you’re close on the idea; effectively, I’d have a master and slave, with the master being live, and the slave having the changes replicated to it; pause the replication on the slave, and then perform the schema changes on the slave, and once the schema changes are done, unpause the replication; once that whole process is complete, pause the master for a very short period of time to assure that the replicated changes are flushed on the slave, and then switch the master and slave. That should do what you need.

    Note that this only works if the changes you’re making to the schema aren’t touched by the pending replication commands; this generally is best done at low-traffic times to assure that the collision is unlikely. Note that because this makes no changes to the master until the slave has completely updated the schema and and replicating changes, it’s very safe on the master.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering what little scripts/programs people here have written that helps one with his
just wondering what tips people have for avoiding game synchronisation issues in multiplayer games
I was wondering how other people implemented this scenario. I have an internal rails
I'm wondering if people can suggest the best tutorial that will walk me through
It is well known that different people have different aptitudes regarding various programming paradigms
I'm wondering if people have a standard format for comments in their code. Not
I am wondering what other people have found to be the best graphing libraries/plug-ins/gems
I am wondering what people have found their best practice to be for testing
I was wondering why do people have to convert numbers to string. What are
Just wondering why people like case sensitivity in a programming language? I'm not trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.