Run migrations down

Hello,

Is there any way to run migrations:down, so it will remove all the tables created?

Thank you

Hi @kkristi01
What is “run migrations down” ? I think you need to add more context of what you are doing and trying to do.

Hi @flamber,

Thanks for the quick reply.

Context: I used an existing postgress db and when the metabase application is started, it automatically creates some tables in the db (migrate:up). Since by mistake, that db contains also other tables, I do not want to mess up metabase tables with my own application ones, and want to remove all the created ones.

Link: https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html#using-postgres-as-the-metabase-application-database

@kkristi01 Yes, migration will create all the tables needed for Metabase. You should probably use a different schema/database, so Metabase has it’s own place - and I would also recommend a dedicated database user, so you separate data privileges.

You have to manually remove the tables created.

@flamber I understand. Alright, thank you for your quick help :pray: