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

  • SEARCH
  • Home
  • 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 7419647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:06:26+00:00 2026-05-29T08:06:26+00:00

To speed up the unit tests I want to use SQLite instead of MySQL,

  • 0

To speed up the unit tests I want to use SQLite instead of MySQL, so I’m trying to get a SQLite-compatible dump of the databases from Propel’s schema.xml. The application is built in Symfony2, and this is how the db configuration in config.yml looks like:

propel:
    dbal:
        driver:               sqlite            
        dsn:                  sqlite:/tmp/test_db1.sq3
        default_connection:   db1
        connections:
           db1:
               user:           %database_user%
               password:       %database_password%
               dsn: sqlite:/tmp/test_db1.sq3   
           db2:
               user:           %database_user%
               password:       %database_password%
               dsn: sqlite:/tmp/test_db2.sq

However, the command app/console propel:build-sql is always generating MySQL-specific dumps that fail to load into SQLite.

I’ve also removed any references to MySQL from properties.ini and still don’t get it right.

Any ideas?

  • 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-29T08:06:27+00:00Added an answer on May 29, 2026 at 8:06 am

    Each connection name has to be related to a database name, so if you declare a connection c1, you need to have a database tag with the attribute name="c1" (in your schema.xml).

    Assuming you have the following schema.xml:

    <database name="default">
        …
    </database>
    

    Write the following section in your config.yml:

    propel:
        dbal:
            default_connection:   default
            connections:
                default:
                    driver:               mysql            
                    username:             root
                    dsn:                  mysql:host=localhost;dbname=my_db
    

    And the following definition in config_test.yml:

    propel:
        dbal:
            connections:
                default:
                    driver:               sqlite            
                    dsn:                  sqlite:/tmp/test_db1.sq3
    

    Then, if you want to generate SQL statements for your tests, just run:

    php app/console --env=test propel:build-sql
    

    To generate SQL statements for your dev env:

    php app/console propel:build-sql
    

    or

    php app/console --env=dev propel:build-sql
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To speed up some unit tests that minimize and maximize windows, I want to
I want to write unit tests for an app running on Windows CE .NET
For speed purposes, I'm trying to decide whether to place my JavaScript in the
I want to test speed of the passing by value and passing by reference
I'm trying to speed up the following code, where given a list of strings
Well, Maven is too good, when talking about speed. But I want something that
I have a couple of MFC applications. I don't want to unit-test UI but
My Django unit tests take a long time to run, so I'm looking for
Are there any best practices in writing unit tests when 90% of the time
What are the recommended approaches to using Thread.sleep() to speed up tests. I am

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.