diff options
author | 2024-03-27 15:51:26 -0400 | |
---|---|---|
committer | 2024-03-27 15:51:26 -0400 | |
commit | 713abb2998bc179443a476f6274432b2fc7d8434 (patch) | |
tree | 7f2684367867068cef673d973aef16029f30935f /packages/db/test/unit/index-queries.test.js | |
parent | 06a6c1a567513a40085c2fe59523dc66d809e1f2 (diff) | |
download | astro-713abb2998bc179443a476f6274432b2fc7d8434.tar.gz astro-713abb2998bc179443a476f6274432b2fc7d8434.tar.zst astro-713abb2998bc179443a476f6274432b2fc7d8434.zip |
chore(db): Rename all collection usage to tables (#10460)
* chore: rename `collection` field to `table`
* chore: remove deprecated ResolvedCollectionConfig type (only used by studio)
* chore: collection -> table in migration-queries
* chore: update tests
* chore: last renames
* chore: bump migration version
* chore: remove deprecated collection field
* chore: droptablequeries
* chore(test): collection -> tables
* chore: revert collection -> table change on migration file
* chore: revert migration version change
* chore: changeset
Diffstat (limited to 'packages/db/test/unit/index-queries.test.js')
-rw-r--r-- | packages/db/test/unit/index-queries.test.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/db/test/unit/index-queries.test.js b/packages/db/test/unit/index-queries.test.js index f5bde70e8..b26815ecf 100644 --- a/packages/db/test/unit/index-queries.test.js +++ b/packages/db/test/unit/index-queries.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; -import { getCollectionChangeQueries } from '../../dist/core/cli/migration-queries.js'; +import { getTableChangeQueries } from '../../dist/core/cli/migration-queries.js'; import { tableSchema } from '../../dist/core/schemas.js'; import { column } from '../../dist/runtime/config.js'; @@ -26,10 +26,10 @@ describe('index queries', () => { }, }; - const { queries } = await getCollectionChangeQueries({ - collectionName: 'user', - oldCollection: userInitial, - newCollection: userFinal, + const { queries } = await getTableChangeQueries({ + tableName: 'user', + oldTable: userInitial, + newTable: userFinal, }); expect(queries).to.deep.equal([ @@ -54,10 +54,10 @@ describe('index queries', () => { indexes: {}, }; - const { queries } = await getCollectionChangeQueries({ - collectionName: 'user', - oldCollection: initial, - newCollection: final, + const { queries } = await getTableChangeQueries({ + tableName: 'user', + oldTable: initial, + newTable: final, }); expect(queries).to.deep.equal(['DROP INDEX "nameIdx"', 'DROP INDEX "emailIdx"']); @@ -82,10 +82,10 @@ describe('index queries', () => { }, }; - const { queries } = await getCollectionChangeQueries({ - collectionName: 'user', - oldCollection: initial, - newCollection: final, + const { queries } = await getTableChangeQueries({ + tableName: 'user', + oldTable: initial, + newTable: final, }); expect(queries).to.deep.equal([ |