You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/11/27 21:41:14 UTC

(superset) branch align_migrations created (now cc96b54131)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a change to branch align_migrations
in repository https://gitbox.apache.org/repos/asf/superset.git


      at cc96b54131 docs(contributing): how to nuke the docker-compose postgres

This branch includes the following new commits:

     new cc96b54131 docs(contributing): how to nuke the docker-compose postgres

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: docs(contributing): how to nuke the docker-compose postgres

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch align_migrations
in repository https://gitbox.apache.org/repos/asf/superset.git

commit cc96b5413120242fd7a3b9ebacaaafa7df634f07
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Nov 27 13:40:52 2024 -0800

    docs(contributing): how to nuke the docker-compose postgres
---
 docs/docs/contributing/development.mdx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/docs/docs/contributing/development.mdx b/docs/docs/contributing/development.mdx
index 19c68c4f9d..b9b05fb890 100644
--- a/docs/docs/contributing/development.mdx
+++ b/docs/docs/contributing/development.mdx
@@ -70,6 +70,24 @@ documentation.
 configured to be secure.
 :::
 
+### Nuking the postgres database
+
+At times, it's possible to end up with your development database in a bad state, it's
+common while switching branches that contain migrations for instance, where the database
+version stamp that `alembic` manages is no longer available after switching branch.
+
+In that case, the easy solution is to nuke the postgres db and start fresh. Note that the full
+state of the database will be gone after doing this, so be cautious.
+
+```bash
+# first stop docker-compose if it's running
+docker-compose down
+# delete the volume containing the database
+docker volume rm superset_db_home
+# restart docker-compose, which will init a fresh database and load examples
+docker-compose up
+```
+
 ## Installing Development Tools
 
 :::note