import { SQL } from '../query/sql/sql.js'; import { Column } from '../query/column.js'; export interface PwSnapshot { version: 'pw1'; id: string; prevId: string; tables: Record; } export interface PwTableSnapshot { name: string; schema: string; columns: Record; indexes: Record; foreignKeys: Record; checks: Record; uniqueConstraints: Record; compositePrimaryKeys: Record; partitionBy: PwPartitionSnapshot | undefined; } export interface PwPartitionSnapshot { strategy: 'range'; /** Column name (snake_case), already projected from the field key. */ column: string; } export interface PwColumnSnapshot { name: string; type: string; primaryKey: boolean; notNull: boolean; default: string | undefined; isUnique: boolean; uniqueName: string | undefined; generated: { as: string; type: 'always'; } | undefined; identity: { type: 'always' | 'byDefault'; name: string | undefined; options: PwSequenceOptions | undefined; } | undefined; } export interface PwSequenceOptions { increment: string | undefined; minValue: string | undefined; maxValue: string | undefined; startWith: string | undefined; cache: string | undefined; cycle: boolean | undefined; } export interface PwIndexSnapshot { name: string; columns: PwIndexColumnSnapshot[]; unique: boolean; method: string; where: string | undefined; concurrently: boolean; with: Record | undefined; } export interface PwIndexColumnSnapshot { expression: string; isExpression: boolean; order: string | undefined; nulls: string | undefined; opClass: string | undefined; } export interface PwForeignKeySnapshot { name: string; columns: string[]; foreignTable: string; foreignSchema: string; foreignColumns: string[]; onUpdate: string | undefined; onDelete: string | undefined; } export interface PwCheckSnapshot { name: string; value: string; } export interface PwUniqueSnapshot { name: string; columns: string[]; nullsNotDistinct: boolean; } export interface PwCompositePKSnapshot { name: string; columns: string[]; } export declare const EMPTY_SNAPSHOT: PwSnapshot; export declare function serializeSQL(value: SQL): string; export declare function serializeDefault(column: Column): string | undefined; export declare function buildSnapshot(imports: Record, prevId: string): PwSnapshot; //# sourceMappingURL=snapshot.d.ts.map