This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-23
Channels
- # announcements (18)
- # babashka (65)
- # bangalore-clj (14)
- # beginners (80)
- # bristol-clojurians (1)
- # calva (4)
- # chlorine-clover (3)
- # cider (39)
- # clj-kondo (5)
- # clojars (1)
- # clojure (134)
- # clojure-france (1)
- # clojure-losangeles (3)
- # clojure-nl (1)
- # clojure-uk (7)
- # clojurescript (17)
- # core-typed (22)
- # data-science (1)
- # datomic (6)
- # duct (9)
- # emacs (48)
- # fulcro (58)
- # graalvm (37)
- # kaocha (2)
- # nrepl (1)
- # reagent (8)
- # shadow-cljs (20)
- # specter (1)
- # tree-sitter (5)
- # xtdb (3)
Does anyone know how to run down migrations in production profile ? I'm using duct.migrator.ragtime for running migrations.
Probably looking for this? https://github.com/duct-framework/docs/blob/master/GUIDE.rst#running-database-migrations-in-production
Also note this PR: https://github.com/duct-framework/docs/pull/6
Thank you. I did try that, but it gave an error for some reason.
It work fine in development using sqlite db, but when I tried it in production i had issues. I had forgotten to set my table column as primary and when I changed it in the migration section of config and ran :duct/migrate , I got an error. I had to drop the table and run migration again
Also, the docs don't say how to rollback a migration.. is it possible ?
Ah..i found this in the blog "Advancing Duct" - In the development environment, the old migration is rolled back and the new one applied. In a production environment an error would be raised instead; in production, we only migrate, we don't rollback.
So in production, you might write your DROP TABLE ...
stuff in an .up.sql
-migration. An advantage of that is that you have the full history of your system.
If you don't care about the database content, you can allways drop the whole database and migrate from 0.
Thank you. Yeah this is not for production use. It's something I'm tryout out to learn the framework. Will try you suggestion