@chimanos/sequelize-replace-enum-postgres
Version:
This package provides the methods needed to replace a PostgreSQL ENUM in Sequelize migrations.
25 lines • 912 B
TypeScript
/**
* Returns the query to create an Enum.
*/
export declare const createEnum: (name: string, values: string[]) => string;
/**
* Get the query to drop default value for a column.
*/
export declare const removeDefaultFromColumn: (tableName: string, columnName: string) => string;
/**
* Get the query to set a column type to an Enum.
*/
export declare const setEnumType: (tableName: string, columnName: string, enumName: string) => string;
/**
* Get the query to drop an Enum.
*/
export declare function dropEnum(name: string): string;
/**
* Get the query to rename an enum.
*/
export declare const renameEnum: (oldEnumName: string, newEnumName: string) => string;
/**
* Get the query to set the default value for a column.
*/
export declare const setColumnDefault: (tableName: string, columnName: string, defaultValue: string, defaultValueType: string) => string;
//# sourceMappingURL=queries.d.ts.map