weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
608 stars 85 forks source link

Add option `:migrations-table-exists-sql` for SQL backed migrations #158

Open mbezjak opened 1 year ago

mbezjak commented 1 year ago

Closes https://github.com/weavejester/ragtime/issues/157

mbezjak commented 1 year ago

@weavejester Here is my first pass to this. Does it look ok to you? Should I continue with adding the same option to ragtime.jdbc?

mbezjak commented 8 months ago

Implemented the same thing in jdbc project. The PR should be complete now.

@weavejester Let me know what you think. Especially about the comment above.

mbezjak commented 8 months ago

Updated as per comments. Thanks for looking into this. :smile:

Can you ensure all lines are 80 characters or less?

Done. Although, there are some prior lines not respecting it.

$ grep -R '.\{81\}' next-jdbc/src/ jdbc/src/
next-jdbc/src/ragtime/next_jdbc.clj:      ;; Returns unqualified maps as some databases (e.g. Oracle) can only return them
next-jdbc/src/ragtime/next_jdbc.clj:      (rs/datafiable-result-set conn {:builder-fn rs/as-unqualified-lower-maps})))
next-jdbc/src/ragtime/next_jdbc.clj:  ;; Remove db quote around the schema and table name; ex.: "\"schema\".\"table\""