Fork me on GitHub
#off-topic
<
2016-12-01
>
pesterhazy11:12:06

I'm new to postgresql (but not to SQL). What do people use as a tool for schema migrations?

pesterhazy11:12:28

don't think it needs to be written in clojure necessarily, but bonus points of course 🙂

saeidscorp11:12:38

I'm happy with joplin.

saeidscorp11:12:48

@pesterhazy I searched a lot for doing migrations in clojure too, no luck!

saeidscorp11:12:30

because of diversity in different sql syntaxes/engines.

saeidscorp11:12:19

it's really hard to create a single library to conform to all of these standards and still stay predictable and reliable.

saeidscorp11:12:11

I mean to create schemas for different sql engines, using a single clojure code.

pesterhazy11:12:47

ultimately you'll work with a single database vendor anyway

pesterhazy11:12:20

so it's best to just write that DDL SQL directly in {postgres,mysql,}'s dialect

saeidscorp11:12:00

agreed 😊👍

juhoteperi11:12:25

Flyway is very robust tool for running migrations from SQL files: https://flywaydb.org/

juhoteperi11:12:49

It is a java library but using it from Clojure requires only a few interop calls

pesterhazy11:12:52

@juhoteperi that looks great actually

pesterhazy11:12:00

love the docs, flyway is a keeper

kauko11:12:09

Yeah we use flyway too

kauko11:12:11

it's good

rkaippully11:12:09

I use liquibase with this clojure wrapper: https://github.com/kumarshantanu/clj-liquibase

rkaippully11:12:48

All DDLs are directly written in SQL - I use MySQL.