4
11 Comments

Developing with a SQL Database?

Hey everyone,

I'm working on a tool that makes it easy to create database snapshots, sanitize the data, and make this data available for development and testing purposes.

It started out as something I use personally for my development, but seems like it could be useful for others as well.

If your development stack uses a database (PostgreSQL, for now), I'd like to get your thoughts on how you manage your development / testing fixtures and maybe even kick the tires and provide some feedback if interested!

Thanks!

on April 12, 2022
  1. 1

    I have mostly worked with Prisma to do these sort of things when building backend applications in TypeScript. Currently as a Clojure developer we rely on writing all these tools adhoc as per the requirement.

    1. 1

      Yes, I also found that with most of the teams I've been on, we've had to roll our own tools or just hacked the data together as needed, at least until it started causing issues with development b/c we couldn't test real-world scenarios.

      1. 1

        I am trying to solve the problem I faced in API integrations, data modeling and database management with vadelabs by building vade studio. May be it could be of some help to you. Would love to know your feedback.
        https://vadelabs.com. Here's the demo video: https://youtu.be/ccTFXqeTM0w

        1. 1

          I'm getting a certificate warning on the youtube link, fyi, so that could be affecting some of your traffic / adoption

          1. 1

            This is weird. It's been working for me. I will check it out. Thanks for letting me know.

            1. 1

              Oh sorry - it's me not you. I ended up on OpenDNS servers with filtering enabled, and that's what was giving me the error!

  2. 1

    I usually spin up a Postgres Docker container. If I want to propagate some fixed data to the database I write a command line tool using Go with compiled in service function calls to write the data into the database.

    1. 1

      Nice - this tool is a CLI written in Go that builds a set of customized snapshots from prod data (or really whatever data you need to use for development) I've often found that I wish I could have a subset of prod data to simulate real world conditions without having to manually build out and update the fixtures.

      It also can spin up ephemeral Docker containers and load the snapshot, let you test with it, and recreate as needed.

      I should have a fresh build of this ready early next week if you'd be interested in trying it out. Postgres / Mac for now, (linux / windows builds available but I haven't tested them yet)

      1. 1

        I'm running in Linux but I'll take a look when it's available.

        1. 1

          Hey Andy,

          I updated the DBSnapper database snapshotting tool and created some documentation.

          It's still early and I have to update and add the sanitize and ephemeral database commands, but I figured may as well get it out there and start getting some feedback. Would love to hear yours if you're willing to give it a try:

          https://dbsnapper.com

          Joe