Skip to content

Commit c3f7fd1

Browse files
authored
Updated DB migration types to support "instant" algorithm (TryGhost#29168)
towards https://linear.app/ghost/issue/NY-1406 This is a types-only change that should have no user impact. `algorithm: 'instant'` is now supported for adding and dropping columns.
1 parent f0de650 commit c3f7fd1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ghost/core/core/server/data/schema/commands.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function dropNullable(tableName, column, transaction = db.knex) {
9999
* @param {import('knex').Knex.Transaction} [transaction]
100100
* @param {object} columnSpec
101101
* @param {object} [options]
102-
* @param {'inplace'|'copy'|'auto'} [options.algorithm] - MySQL only
102+
* @param {'instant'|'inplace'|'copy'|'auto'} [options.algorithm] - MySQL only
103103
*/
104104
async function addColumn(tableName, column, transaction = db.knex, columnSpec, options = {}) {
105105
const addColumnBuilder = transaction.schema.table(tableName, function (table) {
@@ -136,7 +136,7 @@ async function addColumn(tableName, column, transaction = db.knex, columnSpec, o
136136
* @param {import('knex').Knex} [transaction]
137137
* @param {object} [columnSpec]
138138
* @param {object} [options]
139-
* @param {'inplace'|'copy'|'auto'} [options.algorithm] - MySQL only
139+
* @param {'instant'|'inplace'|'copy'|'auto'} [options.algorithm] - MySQL only
140140
*/
141141
async function dropColumn(tableName, column, transaction = db.knex, columnSpec = {}, options = {}) {
142142
if (Object.prototype.hasOwnProperty.call(columnSpec, 'references')) {

0 commit comments

Comments
 (0)