BDD-Experiment icon indicating copy to clipboard operation
BDD-Experiment copied to clipboard

[Question] About the Test database

Open Sydney-o9 opened this issue 11 years ago • 0 comments

Nice demo, I really enjoyed it. I have a quick question about the test table that we created.

In the Backgrounds section, we make sure the database is cleared between the scenarios:

  Background:                               
    Given There is no "Product" in database 
    And There is no "Category" in database  

and then we do

php app/console behat -e test @AcmeDemoBundle

This is a bit scary so I want to make sure I understand properly. Can we run this in our production environment? meaning is this safe 100%?

What if we omit -e test, is this going to delete our prod table?

From what I understand in the database section, we created a database for each environment: symfony_prod, symfony_dev and symfony_test.

But when executing

php app/console doctrine:schema:create -e test

We are informed

ATTENTION: This operation should not be executed in a production environment.

So here is my question, what is the safest way to do this in production environment?

Sydney-o9 avatar Jan 12 '14 02:01 Sydney-o9