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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:35:47+00:00 2026-06-13T16:35:47+00:00

A common pattern between development and production is a dev website will use sqlite,

  • 0

A common pattern between development and production is a dev website will use sqlite, because it is zero setup, but then use PostgresSQL or MySQL in production. However, in the default Settings.hs scaffolding file generated by Yesod, only one persistent backend is specified. Is there a way to have the Development configuration use one persistent backend, and the Production configuration another? Additionally, these should have distinct database setting YAML files, so that a simple filename can be configured for sqlite, but production db credentials never hit the VCS repository.

  • 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-06-13T16:35:48+00:00Added an answer on June 13, 2026 at 4:35 pm

    I don’t like this practice in general, as there can be subtle differences between database engines that don’t show up until production. (This can be mitigated by having a staging server in-between.)

    Anyway, you can certainly do this via conditional compilation, though the scaffolded site isn’t designed to work that way out-of-the-box. Just look for all the places that refer to a specific backend and make it conditional on the DEVELOPMENT CPP variable.

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

Sidebar

Related Questions

Is it a common pattern/idiom to use free functions as pseudo-constructors to avoid having
Data Access Objects (DAOs) are a common design pattern, and recommended by Sun. But
Possible Duplicate: Difference between static class and singleton pattern? we use static class for
One common pattern when caching with Django is to use the current site's ID
Design patters are a point of arguments between developers, but I use them very
This is becoming a common pattern in my code, for when I need to
I'm working with a fairly common pattern - a page opens a child window
The following simple code pattern is very common in graphics programming. It creates an
What is an ObjectMother and what are common usage scenarios for this pattern?
The following seems to be a relatively common pattern (to me, not to the

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.