Is it safe to update my database schema on Azure without losing data?

0
8
Asked By CuriousCoder92 On

I've recently joined a small project that uses Azure for its storage and database. I need to implement a delete function, which requires me to update the database schema since the key currently has no 'on_delete' rule set. Additionally, I may need to add a new column later. The database was created using SQLAlchemy in Python. I'm worried that if I change the code and push the update, Azure might interpret it as a completely new schema and create a new database, which would result in the loss of all production data. I'm fairly confident that I can implement this without issues, but given that this is production data, I want to be cautious.

3 Answers

Answered By DiligentTester55 On

Since things can go wrong, I'd recommend making a copy of your database to another environment and test your schema changes there first. Better safe than sorry!

Answered By SkepticalDev72 On

If you can't clearly explain what your code changes will do, you might want to reconsider deploying it to production. It's crucial to be sure before making any updates.

Answered By CloudWatcher88 On

Azure doesn't automatically create a new database just because you've changed your schema. The updates you push with SQLAlchemy should apply to the existing database. Just make sure you have backups before you proceed.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.