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 6621529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:16:38+00:00 2026-05-25T21:16:38+00:00

We work with Phing ‘s dbdeploy task to do version control of our PostgreSQL

  • 0

We work with Phing‘s dbdeploy task to do version control of our PostgreSQL databases, which altogether is a nice way of working. I don’t really have a lot of problems with database versions after we started working with it, apart from one nagging doubt: how do we control the data the database contains?

Right now, I usually have a delta that contains some example data, which is used for testing, but in a production environment, I want to have production data, as in, actual valid data. Of course, I could write another delta which truncates the testdata and insert the actual data, but somehow that feels clunky and cumbersome, as the only language in a delta is SQL. When writing such a delta, handling sequences and making sure foreign key relations are correct, is a real pain.

So I figured it might make sense to write a PHP script that will import data from, say, a CSV file. That would actually work, until there is another database change that renames a column, which would render the PHP file useless. Of course, that is easily fixed by updating the script to incorporate the database changes and re-running the script, but that’s error-prone, which sort of is the reason I started using dbdeploy in the first place.

So, my question is; how do you handle data while deploying changes, or more accurately: how do you insert the data the production environment needs?

  • 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-25T21:16:38+00:00Added an answer on May 25, 2026 at 9:16 pm

    You’re right that testing data should be left out of deltas the same way testing shouldn’t probably be done on a production system. What do you use for testing? Phpunit, Selenium, …? Do you use any php framework?

    Anyway the best way may be using something that might already come shipped with whatever tool you happen to be using. For example Symfony 1.x has quite a good fixture management. For testing PHP code, PHPUnit is a de facto standard and it comes with some fixture management. Try looking at the PHPUnit documentation for more info on how it handles datasets: http://www.phpunit.de/manual/current/en/database.html#understanding-datasets-and-datatables

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

Sidebar

Related Questions

I am trying to get phing to work nice with liquibase. But pPing gives
At work we are currently still using JUnit 3 to run our tests. We
At work, we have multiple branches that we may be working on at any
I have been trying to figure out a way to manage our domains at
Given a ping in ms, is there any way to algorithmically work out the
The curl Command is working on one server and does not work on other.
I have the following Phing configuration file: <?xml version=1.0 encoding=UTF-8?> <project name=ru.fractalizer.phpsweetpdo default=make-phar-packages basedir=..>
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit

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.