Utility functions to evaluate and manage database migration phases in Appwrite console.
// Source: https://github.com/appwrite/appwrite | License: BSD-3-Clause | Copyright 2019 Appwrite (https://appwrite.io) and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
import type { Models } from '@appwrite.io/console'
import { coerceTrimmedString } from '@/lib/databases/dedicated-database-status'
const TABLES_DATABASE_MIGRATION_COMPLETE_PHASE = 'done'
/** Phases where DELETE /migrations/{id} is not allowed (cutover already started). */
const TABLES_DATABASE_MIGRATION_NON_ABORTABLE_PHASES = new Set([
'cutover',
'soaking',
TABLES_DATABASE_MIGRATION_COMPLETE_PHASE,
])
type TablesDatabaseMigrationPhaseFields = Pick<
Models.DatabaseMigration,
'phase' | 'cutoverAt'
>
export function hasTablesDatabaseMigrationCutover(
migration: Pick<M
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key