0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/data
Daniel Lockyer bf45ef4a87 Cleaned up DB connection fallback in migrations commands
- throughout the migration utils we use the passed in DB connection or
  fallback to the `db.knex` instance
- this works, but it means we have places we need to make sure to
  implement `(transaction || db.knex)` everywhere
- as I'm working on refactoring the utils, this was also causing
  problems because I'd be checking the `transaction` instance but that may
  be null/undefined
- this commit pulls the fallback into the function parameters where it's
  evaluated at runtime
- this also has the added benefit that we get jsdoc typing now because
  the types are easy to figure out
- note: `transaction` should probably be renamed to `connection` because
  it's not necessary a transaction... but baby steps 🤓
2022-03-02 13:27:21 +01:00
..
db Added library for extracting database information 2022-01-18 09:31:08 +00:00
exporter Added pivot table to store tiers on post (#14038) 2022-01-31 15:33:58 +05:30
importer Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
migrations Added visible column to products table (#14221) 2022-03-01 18:11:59 +02:00
schema Cleaned up DB connection fallback in migrations commands 2022-03-02 13:27:21 +01:00