diff --git a/packages/db/src/core/cli/commands/push/index.ts b/packages/db/src/core/cli/commands/push/index.ts index 1c993e9a75..c847bc1eba 100644 --- a/packages/db/src/core/cli/commands/push/index.ts +++ b/packages/db/src/core/cli/commands/push/index.ts @@ -1,5 +1,6 @@ import type { AstroConfig } from 'astro'; import type { Arguments } from 'yargs-parser'; +import { MIGRATION_VERSION } from '../../../consts.js'; import { getManagedAppTokenOrExit } from '../../../tokens.js'; import { type DBConfig, type DBSnapshot } from '../../../types.js'; import { getRemoteDatabaseUrl } from '../../../utils.js'; @@ -10,7 +11,6 @@ import { getMigrationQueries, getProductionCurrentSnapshot, } from '../../migration-queries.js'; -import { MIGRATION_VERSION } from '../../../consts.js'; export async function cmd({ dbConfig, diff --git a/packages/db/src/core/cli/migration-queries.ts b/packages/db/src/core/cli/migration-queries.ts index ecef78b44f..425e81b021 100644 --- a/packages/db/src/core/cli/migration-queries.ts +++ b/packages/db/src/core/cli/migration-queries.ts @@ -14,6 +14,7 @@ import { schemaTypeToSqlType, } from '../../runtime/queries.js'; import { isSerializedSQL } from '../../runtime/types.js'; +import { MIGRATION_VERSION } from '../consts.js'; import { RENAME_COLUMN_ERROR, RENAME_TABLE_ERROR } from '../errors.js'; import { type BooleanColumn, @@ -32,7 +33,6 @@ import { columnSchema, } from '../types.js'; import { getRemoteDatabaseUrl } from '../utils.js'; -import { MIGRATION_VERSION } from '../consts.js'; const sqlite = new SQLiteAsyncDialect(); const genTempTableName = customAlphabet('abcdefghijklmnopqrstuvwxyz', 10); diff --git a/packages/db/src/core/consts.ts b/packages/db/src/core/consts.ts index cc7f59b9a5..54d766c0f4 100644 --- a/packages/db/src/core/consts.ts +++ b/packages/db/src/core/consts.ts @@ -16,4 +16,4 @@ export const DB_PATH = '.astro/content.db'; export const CONFIG_FILE_NAMES = ['config.ts', 'config.js', 'config.mts', 'config.mjs']; -export const MIGRATION_VERSION = "2024-03-12"; +export const MIGRATION_VERSION = '2024-03-12'; diff --git a/packages/db/test/unit/column-queries.test.js b/packages/db/test/unit/column-queries.test.js index 50218ec34b..8ba6552f83 100644 --- a/packages/db/test/unit/column-queries.test.js +++ b/packages/db/test/unit/column-queries.test.js @@ -4,10 +4,10 @@ import { getCollectionChangeQueries, getMigrationQueries, } from '../../dist/core/cli/migration-queries.js'; +import { MIGRATION_VERSION } from '../../dist/core/consts.js'; import { tableSchema } from '../../dist/core/types.js'; import { column, defineTable } from '../../dist/runtime/config.js'; import { NOW } from '../../dist/runtime/index.js'; -import { MIGRATION_VERSION } from '../../dist/core/consts.js'; const TABLE_NAME = 'Users';