import { Databases } from 'node-appwrite'; import { TableDefinition, ORMConfig } from '../shared/types'; export declare class Migration { private config; private attributeManager; private indexManager; private permissionManager; private db; private sqlMigrations; private firebaseMigrations; private textMigrations; constructor(databases: Databases, config: ORMConfig); /** * Migrate table schemas */ migrate(tables: TableDefinition[]): Promise; /** * Validate database structure matches the provided table definitions */ validate(tables: TableDefinition[]): Promise; /** * Ensure database exists, create if it doesn't */ private ensureDatabaseExists; /** * Migrate a single collection */ private migrateCollection; /** * Validate a single collection structure */ private validateCollection; /** * Wait for attributes to become available in Appwrite * Appwrite creates attributes asynchronously, so we poll until they're all available */ private waitForAttributesAvailable; /** * Export schema to SQL format * @param tables Array of table definitions to export * @returns SQL CREATE TABLE statements as a string * @throws ORMMigrationError if validation fails or export encounters an error */ exportToSQL(tables: TableDefinition[]): string; /** * Export schema to Firebase format * @param tables Array of table definitions to export * @returns Firebase security rules and structure as a JSON string * @throws ORMMigrationError if validation fails or export encounters an error */ exportToFirebase(tables: TableDefinition[]): string; /** * Export schema to text format * @param tables Array of table definitions to export * @returns Human-readable text description of the schema * @throws ORMMigrationError if validation fails or export encounters an error */ exportToText(tables: TableDefinition[]): string; /** * Validate TableDefinition array before processing * @param tables Array of table definitions to validate * @throws ORMMigrationError if validation fails */ private validateTableDefinitions; } //# sourceMappingURL=migration.d.ts.map