@grandlinex/bundle-postgresql
Version:
> Postgresql support GrandlineX using `pg`
30 lines (29 loc) • 1.06 kB
TypeScript
import { CoreDBUpdate } from '@grandlinex/core';
import PGCon from './PGCon.js';
export default abstract class PGUpdate extends CoreDBUpdate<PGCon> {
/**
* Initialize a new table in the database.
* This method is used to create a new table in the database.
* @param className
*/
protected initNewTable(className: string): Promise<boolean>;
/**
* Alter a table to add a new column.
* @param className
* @param columName
* @param type
* @param notNull
* @param defaultValue
* @param deleteDefault
* @protected
*/
protected alterTableAddColumn(className: string, columName: string, type: string, notNull: boolean, defaultValue?: string, deleteDefault?: boolean): Promise<boolean>;
/**
* Alter a table to delete a column.
* This method is used to remove a column from an existing table in the database.
* @param className
* @param columName
* @protected
*/
protected alterTableDeleteColumn(className: string, columName: string): Promise<boolean>;
}