When developing new features or trying to recreate issues with a database involved, returning the database to its starting point is often time consuming and challenging. Using Spawn data containers you can quickly and easily reset your data container, returning it to its starting state, including data and schema changes.
Spawn is currently in open beta. Complete the installation instructions to get access.
This is part of a series of short guides for getting up and running quickly with Spawn.
This example uses an empty PostgeSQL data container, but you can follow along with any type by modifying the connection and queries accordingly. Connect to your data container and examine the current state by finding out which tables exist. Connect using whatever tool you would normally for the database engine type you are working with.
In this case, the data container is empty so no tables exist.
Make a modification to the data container, in this example using the same session as the previous step.
There is now a table created in the data container that wasn't present when it was first created.
To return the data container to its initial state without modifications, run the reset command.
You can now reconnect to the data container (the connection details remain the same but the previous connection will have been terminated) and verify that it has returned to its initial state.