@chimanos/sequelize-replace-enum-postgres
Version:
This package provides the methods needed to replace a PostgreSQL ENUM in Sequelize migrations.
18 lines • 673 B
TypeScript
import { QueryInterface, QueryOptions, TransactionOptions } from 'sequelize';
/**
* Since PostgreSQL still does not support remove values from an ENUM,
* the workaround is to create a new ENUM with the new values and use it
* to replace the other.
*/
export declare const replaceEnum: (queryInterface: QueryInterface) => (args: {
tableName: string;
columnName: string;
enumName?: string | null;
newValues: string[];
defaultValue?: string | null;
transactionOptions?: TransactionOptions | null;
queryOptions?: QueryOptions | null;
}) => Promise<void>;
export * from './helpers';
export default replaceEnum;
//# sourceMappingURL=index.d.ts.map