import type { Dialect } from '../../sql';
export { Dialect };
export declare const INTERNAL_TABLES: Set<string>;
export interface GeneratedColumnSchema {
    expression: string;
    storage: 'virtual' | 'stored';
}
export interface ColumnSchema {
    name: string;
    type: string;
    size?: number;
    scale?: number;
    unsigned: boolean;
    nullable: boolean;
    autoIncrement: boolean;
    primaryKey: boolean;
    defaultValue?: string | number | boolean | null;
    defaultExpression?: string;
    onUpdateExpression?: string;
    generated?: GeneratedColumnSchema;
    enumValues?: string[];
    enumTypeName?: string;
    afterColumn?: string | null;
    ordinalPosition: number;
}
export interface TableSchema {
    name: string;
    columns: ColumnSchema[];
    indexes: IndexSchema[];
    foreignKeys: ForeignKeySchema[];
    primaryKeyColumns?: string[];
    primaryKeyConstraintName?: string;
}
export type DatabaseSchema = Map<string, TableSchema>;
export interface IndexSchema {
    name: string;
    columns: string[];
    unique: boolean;
    size?: number;
    columnSizes?: Record<string, number>;
    constraintName?: string;
    spatial?: boolean;
}
export interface ForeignKeySchema {
    name: string;
    localColumns: string[];
    foreignTable: string;
    foreignColumns: string[];
    onDelete?: string;
    onUpdate?: string;
}
export interface TableForeignKeySchema {
    tableName: string;
    foreignKey: ForeignKeySchema;
}
export interface SchemaDiff {
    dialect: Dialect;
    pgSchema?: string;
    externalForeignKeyDrops: TableForeignKeySchema[];
    externalForeignKeyAdds: TableForeignKeySchema[];
    addedTables: TableSchema[];
    removedTables: TableSchema[];
    modifiedTables: TableDiff[];
}
export interface TableDiff {
    tableName: string;
    addedColumns: ColumnSchema[];
    removedColumns: ColumnSchema[];
    modifiedColumns: ColumnModification[];
    primaryKeyChanged: boolean;
    oldPrimaryKey: string[];
    newPrimaryKey: string[];
    oldPrimaryKeyConstraintName?: string;
    oldAutoIncrementPrimaryKeyColumns: ColumnSchema[];
    newAutoIncrementColumns: ColumnSchema[];
    addedIndexes: IndexSchema[];
    removedIndexes: IndexSchema[];
    modifiedIndexes: IndexModification[];
    addedForeignKeys: ForeignKeySchema[];
    removedForeignKeys: ForeignKeySchema[];
    modifiedForeignKeys: ForeignKeyModification[];
    preservedForeignKeys: ForeignKeySchema[];
}
export interface ColumnModification {
    name: string;
    oldColumn: ColumnSchema;
    newColumn: ColumnSchema;
    typeChanged: boolean;
    nullableChanged: boolean;
    defaultChanged: boolean;
    autoIncrementChanged: boolean;
    generatedChanged: boolean;
}
export interface IndexModification {
    name: string;
    oldIndex: IndexSchema;
    newIndex: IndexSchema;
}
export interface ForeignKeyModification {
    name: string;
    oldForeignKey: ForeignKeySchema;
    newForeignKey: ForeignKeySchema;
}
export declare function hasSchemaChanges(diff: SchemaDiff): boolean;
//# sourceMappingURL=schema-model.d.ts.map