Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

commish's avatar

Prototype Deployment

Bare with me, my noob will be showing pretty shamelessly here.

I’m developing a social media site and want to deploy it for a couple of friends to test out and provide feedback. However, whenever you change the database, it blows away all the generated content. The nature of my project is complex enough that i absolutely need realworld test driving experimentation to get the database relationships right in an intuitive way.

My questions are, what is best practice for this scenario? Do you just nullify new columns on existing content? Is it just the nature of the beast and an expectation i need to manage for my friends if the content does empty between major feature changes? Is there a nice backup and autofill database tool to be utilizing in case this happens? And finally do i need to keep anything in mind regarding relationships where corrupting the database might be inevitable in some cases?

0 likes
2 replies
bobbybouwmann's avatar

What do you mean with "change the database, it blows away all the generated content"?

In general, your production environment has one database which doesn't change on deployments or new features. You don't want to lose your data of course ;)

commish's avatar

Maybe I’m putting the cart before the horse and should completely finish the laravel6 from scratch tutorial. It seems whenever a column is added/removed, and you migrate, it clears the database. Of course there’s the production migrations that add or remove a single column without clearing databases.

Maybe i just have anxiety over the possibility of a cleared database once other people are playing around with it. Are there best practices when changing the database and models around? Anything to be aware and careful of?

Please or to participate in this conversation.