toucan icon indicating copy to clipboard operation
toucan copied to clipboard

Migrations?

Open himat opened this issue 2 years ago • 1 comments

Hi,

How do you recommend doing migrations with toucan? Are we supposed to use a separate library for that?

@camsaul

himat avatar Aug 13 '22 18:08 himat

@himat I'm not a contributor, but I don't think this lib is scoped for migrations.

migratus is a library to handle migrations that works very well.

bolivier avatar Aug 24 '22 13:08 bolivier

If I may https://gist.github.com/geraldodev/f4cc25376331ebd37d2eb8a4d3ccf8a9 mybatis migrations are sql based. This simple babashka script is meant to be placed on the root of the project, it will default the migrations to WhereUPutTheScript/migrations. it builds the classpath to invoke migrations, it downloads the dependencies (bb has a deps.edn like library) ./migrate.clj init ./migrate.clj status ./migrate.clj up ./migrate.clj down

geraldodev avatar Jan 29 '23 15:01 geraldodev

I don't think this lib is scoped for migrations.

This is correct; toucan doesn't do anything for migrations. Metabase uses Liquibase, but Migratus or MyBatis (as suggested) or whatever should all work too.

tsmacdonald avatar Jan 31 '23 10:01 tsmacdonald

Yup, I want to second https://github.com/yogthos/migratus -- I haven't used it personally yet but if I were to start a new project I think I'd give that a go

camsaul avatar Feb 03 '23 00:02 camsaul