diff --git a/.changeset/big-moons-train.md b/.changeset/big-moons-train.md new file mode 100644 index 00000000000..661d08ebbb4 --- /dev/null +++ b/.changeset/big-moons-train.md @@ -0,0 +1,5 @@ +--- +'@keystonejs/adapter-knex': patch +--- + +Added an internal method `_createTables()` to factor out table creation. diff --git a/packages/adapter-knex/lib/adapter-knex.js b/packages/adapter-knex/lib/adapter-knex.js index 5d9d71e8c3a..b1c6abc08c2 100644 --- a/packages/adapter-knex/lib/adapter-knex.js +++ b/packages/adapter-knex/lib/adapter-knex.js @@ -79,7 +79,10 @@ class KnexAdapter extends BaseKeystoneAdapter { } else { return []; } + return this._createTables(); + } + async _createTables() { const createResult = await pSettle( Object.values(this.listAdapters).map(listAdapter => listAdapter.createTable()) );