0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/data/schema
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
..
clients Cleaned up DB connection fallback in migrations commands 2022-03-02 13:27:21 +01:00
default-settings Made default settings file location configurable 2022-02-21 20:06:20 +13:00
fixtures Added visible column to products table (#14221) 2022-03-01 18:11:59 +02:00
checks.js
commands.js Cleaned up DB connection fallback in migrations commands 2022-03-02 13:27:21 +01:00
index.js Moved schema validator into the schema module 2021-06-15 11:54:34 +01:00
schema.js Added visible column to products table (#14221) 2022-03-01 18:11:59 +02:00
validator.js Switch to @trghost/validator, remove validator 2021-06-16 08:11:22 +01:00