node-pg-migrate
Version:
PostgreSQL database migration management tool for node.js
14 lines (13 loc) • 765 B
TypeScript
import type { MigrationOptions } from '../../migrationOptions';
import type { Literal } from '../../utils/createTransformer';
import type { Name } from '../generalTypes';
import type { CreateIndexOptions } from './createIndex';
import type { DropIndexOptions } from './dropIndex';
export interface IndexColumn {
name: string;
opclass?: Name;
sort?: 'ASC' | 'DESC';
}
export declare function generateIndexName(table: Name, columns: Array<string | IndexColumn>, options: CreateIndexOptions | DropIndexOptions, schemalize: Literal): Name;
export declare function generateColumnString(column: Name, mOptions: MigrationOptions): string;
export declare function generateColumnsString(columns: Array<string | IndexColumn>, mOptions: MigrationOptions): string;