UNPKG

@chimanos/sequelize-replace-enum-postgres

Version:

This package provides the methods needed to replace a PostgreSQL ENUM in Sequelize migrations.

52 lines 1.46 kB
import { QueryInterface, QueryOptions } from 'sequelize'; /** * Create a new ENUM. */ export declare const createEnum: (queryInterface: QueryInterface) => (args: { name: string; values: string[]; queryOptions?: QueryOptions | null; }) => Promise<any>; /** * Unset default value from ENUM. */ export declare const unsetDefaultValueFromEnum: (queryInterface: QueryInterface) => (args: { tableName: string; columnName: string; queryOptions?: QueryOptions | null; }) => Promise<any>; /** * Set the column type to an Enum. */ export declare const setColumnTypeToEnum: (queryInterface: QueryInterface) => (args: { tableName: string; columnName: string; enumName: string; queryOptions: QueryOptions; }) => Promise<any>; /** * Drop an Enum. */ export declare const dropEnum: (queryInterface: QueryInterface) => (args: { name: string; queryOptions: QueryOptions; }) => Promise<any>; /** * Rename an Enum. */ export declare const renameEnum: (queryInterface: QueryInterface) => (args: { oldEnumName: string; newEnumName: string; queryOptions: QueryOptions; }) => Promise<any>; /** * Set the default value for a column. */ export declare const setColumnDefault: (queryInterface: QueryInterface) => (args: { tableName: string; columnName: string; defaultValue: string; defaultValueType: string; queryOptions: QueryOptions; }) => Promise<any>; //# sourceMappingURL=helpers.d.ts.map