diff --git a/src/operations/domains/alterDomain.ts b/src/operations/domains/alterDomain.ts index 54a15a7a..2423f61e 100644 --- a/src/operations/domains/alterDomain.ts +++ b/src/operations/domains/alterDomain.ts @@ -10,7 +10,7 @@ export interface DomainOptionsAlter extends DomainOptions { export type AlterDomain = ( domainName: Name, domainOptions: DomainOptionsAlter -) => string | string[]; +) => string; export function alterDomain(mOptions: MigrationOptions): AlterDomain { const _alter: AlterDomain = (domainName, options) => { diff --git a/src/operations/domains/createDomain.ts b/src/operations/domains/createDomain.ts index 60241f71..960e4a2e 100644 --- a/src/operations/domains/createDomain.ts +++ b/src/operations/domains/createDomain.ts @@ -12,7 +12,7 @@ export type CreateDomainFn = ( domainName: Name, type: Type, domainOptions?: DomainOptionsCreate & DropOptions -) => string | string[]; +) => string; export type CreateDomain = Reversible; diff --git a/src/operations/domains/dropDomain.ts b/src/operations/domains/dropDomain.ts index 9947170e..88f333a6 100644 --- a/src/operations/domains/dropDomain.ts +++ b/src/operations/domains/dropDomain.ts @@ -4,7 +4,7 @@ import type { DropOptions, Name } from '../generalTypes'; export type DropDomain = ( domainName: Name, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropDomain(mOptions: MigrationOptions): DropDomain { const _drop: DropDomain = (domainName, options = {}) => { diff --git a/src/operations/domains/renameDomain.ts b/src/operations/domains/renameDomain.ts index 569c4060..091bc025 100644 --- a/src/operations/domains/renameDomain.ts +++ b/src/operations/domains/renameDomain.ts @@ -4,7 +4,7 @@ import type { Name, Reversible } from '../generalTypes'; export type RenameDomainFn = ( oldDomainName: Name, newDomainName: Name -) => string | string[]; +) => string; export type RenameDomain = Reversible; diff --git a/src/operations/functions/createFunction.ts b/src/operations/functions/createFunction.ts index 9d3231cf..073b81bc 100644 --- a/src/operations/functions/createFunction.ts +++ b/src/operations/functions/createFunction.ts @@ -9,7 +9,7 @@ export type CreateFunctionFn = ( functionParams: FunctionParam[], functionOptions: FunctionOptions & DropOptions, definition: Value -) => string | string[]; +) => string; export type CreateFunction = Reversible; diff --git a/src/operations/functions/dropFunction.ts b/src/operations/functions/dropFunction.ts index 47fb7a7a..40bcdf02 100644 --- a/src/operations/functions/dropFunction.ts +++ b/src/operations/functions/dropFunction.ts @@ -7,7 +7,7 @@ export type DropFunction = ( functionName: Name, functionParams: FunctionParam[], dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropFunction(mOptions: MigrationOptions): DropFunction { const _drop: DropFunction = ( diff --git a/src/operations/functions/renameFunction.ts b/src/operations/functions/renameFunction.ts index 718fcbb8..d055613a 100644 --- a/src/operations/functions/renameFunction.ts +++ b/src/operations/functions/renameFunction.ts @@ -7,7 +7,7 @@ export type RenameFunctionFn = ( oldFunctionName: Name, functionParams: FunctionParam[], newFunctionName: Name -) => string | string[]; +) => string; export type RenameFunction = Reversible; diff --git a/src/operations/grants/grantOnSchemas.ts b/src/operations/grants/grantOnSchemas.ts index 187670d0..978ab5e0 100644 --- a/src/operations/grants/grantOnSchemas.ts +++ b/src/operations/grants/grantOnSchemas.ts @@ -19,9 +19,7 @@ export type GrantOnSchemasOptions = OnlyGrantOnSchemasOptions & WithGrantOption & RevokeOnObjectsOptions; -export type GrantOnSchemasFn = ( - options: GrantOnSchemasOptions -) => string | string[]; +export type GrantOnSchemasFn = (options: GrantOnSchemasOptions) => string; export type GrantOnSchemas = Reversible; diff --git a/src/operations/grants/grantOnTables.ts b/src/operations/grants/grantOnTables.ts index 0dcb3d31..75fbbcf2 100644 --- a/src/operations/grants/grantOnTables.ts +++ b/src/operations/grants/grantOnTables.ts @@ -22,7 +22,7 @@ export type GrantOnTablesOptions = export type GrantOnTablesFn = ( options: GrantOnTablesOptions & RevokeOnObjectsOptions -) => string | string[]; +) => string; export type GrantOnTables = Reversible; diff --git a/src/operations/grants/grantRoles.ts b/src/operations/grants/grantRoles.ts index 7ff4aa0e..3cab98ec 100644 --- a/src/operations/grants/grantRoles.ts +++ b/src/operations/grants/grantRoles.ts @@ -11,7 +11,7 @@ export type GrantRolesFn = ( rolesFrom: Name | Name[], rolesTo: Name | Name[], grantRolesOptions?: GrantRolesOptions -) => string | string[]; +) => string; export type GrantRoles = GrantRolesFn & { reverse: GrantRolesFn }; diff --git a/src/operations/grants/revokeOnSchemas.ts b/src/operations/grants/revokeOnSchemas.ts index acf197b1..b3dd9f6d 100644 --- a/src/operations/grants/revokeOnSchemas.ts +++ b/src/operations/grants/revokeOnSchemas.ts @@ -7,9 +7,7 @@ import { asRolesStr } from './shared'; export type RevokeOnSchemasOptions = OnlyGrantOnSchemasOptions & RevokeOnObjectsOptions; -export type RevokeOnSchemas = ( - options: RevokeOnSchemasOptions -) => string | string[]; +export type RevokeOnSchemas = (options: RevokeOnSchemasOptions) => string; export function revokeOnSchemas(mOptions: MigrationOptions): RevokeOnSchemas { const _revokeOnSchemas: RevokeOnSchemas = ({ diff --git a/src/operations/grants/revokeOnTables.ts b/src/operations/grants/revokeOnTables.ts index 521e93d1..a3e50c4d 100644 --- a/src/operations/grants/revokeOnTables.ts +++ b/src/operations/grants/revokeOnTables.ts @@ -12,9 +12,7 @@ export type RevokeOnTablesOptions = CommonOnTablesOptions & (AllTablesOptions | SomeTablesOptions) & RevokeOnObjectsOptions; -export type RevokeOnTables = ( - options: RevokeOnTablesOptions -) => string | string[]; +export type RevokeOnTables = (options: RevokeOnTablesOptions) => string; export function revokeOnTables(mOptions: MigrationOptions): RevokeOnTables { const _revokeOnTables: RevokeOnTables = (options) => { diff --git a/src/operations/grants/revokeRoles.ts b/src/operations/grants/revokeRoles.ts index dbb6a4b1..2637d4f6 100644 --- a/src/operations/grants/revokeRoles.ts +++ b/src/operations/grants/revokeRoles.ts @@ -9,7 +9,7 @@ export type RevokeRoles = ( roles: Name | Name[], rolesFrom: Name | Name[], revokeRolesOptions?: RevokeRolesOptions -) => string | string[]; +) => string; export function revokeRoles(mOptions: MigrationOptions): RevokeRoles { const _revokeRoles: RevokeRoles = (roles, rolesFrom, options) => { diff --git a/src/operations/indexes/createIndex.ts b/src/operations/indexes/createIndex.ts index fae405a8..93d6ef62 100644 --- a/src/operations/indexes/createIndex.ts +++ b/src/operations/indexes/createIndex.ts @@ -31,7 +31,7 @@ export type CreateIndexFn = ( tableName: Name, columns: string | Array, options?: CreateIndexOptions & DropIndexOptions -) => string | string[]; +) => string; export type CreateIndex = Reversible; diff --git a/src/operations/indexes/dropIndex.ts b/src/operations/indexes/dropIndex.ts index c1fd50f4..f1c31cc2 100644 --- a/src/operations/indexes/dropIndex.ts +++ b/src/operations/indexes/dropIndex.ts @@ -16,7 +16,7 @@ export type DropIndex = ( tableName: Name, columns: string | Array, options?: DropIndexOptions -) => string | string[]; +) => string; export function dropIndex(mOptions: MigrationOptions): DropIndex { const _drop: DropIndex = (tableName, rawColumns, options = {}) => { diff --git a/src/operations/materializedViews/alterMaterializedView.ts b/src/operations/materializedViews/alterMaterializedView.ts index 07d8b601..e8c3c969 100644 --- a/src/operations/materializedViews/alterMaterializedView.ts +++ b/src/operations/materializedViews/alterMaterializedView.ts @@ -15,7 +15,7 @@ export interface AlterMaterializedViewOptions { export type AlterMaterializedView = ( viewName: Name, options: AlterMaterializedViewOptions -) => string | string[]; +) => string; export function alterMaterializedView( mOptions: MigrationOptions diff --git a/src/operations/materializedViews/createMaterializedView.ts b/src/operations/materializedViews/createMaterializedView.ts index db5bf8b7..1df04e51 100644 --- a/src/operations/materializedViews/createMaterializedView.ts +++ b/src/operations/materializedViews/createMaterializedView.ts @@ -24,7 +24,7 @@ export type CreateMaterializedViewFn = ( viewName: Name, options: CreateMaterializedViewOptions & DropOptions, definition: string -) => string | string[]; +) => string; export type CreateMaterializedView = Reversible; diff --git a/src/operations/materializedViews/dropMaterializedView.ts b/src/operations/materializedViews/dropMaterializedView.ts index 0ae6b165..89b2e9f6 100644 --- a/src/operations/materializedViews/dropMaterializedView.ts +++ b/src/operations/materializedViews/dropMaterializedView.ts @@ -4,7 +4,7 @@ import type { DropOptions, Name } from '../generalTypes'; export type DropMaterializedView = ( viewName: Name, options?: DropOptions -) => string | string[]; +) => string; export function dropMaterializedView( mOptions: MigrationOptions diff --git a/src/operations/materializedViews/refreshMaterializedView.ts b/src/operations/materializedViews/refreshMaterializedView.ts index c44493f7..1681249b 100644 --- a/src/operations/materializedViews/refreshMaterializedView.ts +++ b/src/operations/materializedViews/refreshMaterializedView.ts @@ -11,7 +11,7 @@ export interface RefreshMaterializedViewOptions { export type RefreshMaterializedViewFn = ( viewName: Name, options?: RefreshMaterializedViewOptions -) => string | string[]; +) => string; export type RefreshMaterializedView = Reversible; diff --git a/src/operations/materializedViews/renameMaterializedView.ts b/src/operations/materializedViews/renameMaterializedView.ts index f2ced1c5..877088fe 100644 --- a/src/operations/materializedViews/renameMaterializedView.ts +++ b/src/operations/materializedViews/renameMaterializedView.ts @@ -4,7 +4,7 @@ import type { Name, Reversible } from '../generalTypes'; export type RenameMaterializedViewFn = ( viewName: Name, newViewName: Name -) => string | string[]; +) => string; export type RenameMaterializedView = Reversible; diff --git a/src/operations/materializedViews/renameMaterializedViewColumn.ts b/src/operations/materializedViews/renameMaterializedViewColumn.ts index 5281244d..a11eb16c 100644 --- a/src/operations/materializedViews/renameMaterializedViewColumn.ts +++ b/src/operations/materializedViews/renameMaterializedViewColumn.ts @@ -5,7 +5,7 @@ export type RenameMaterializedViewColumnFn = ( viewName: Name, columnName: string, newColumnName: string -) => string | string[]; +) => string; export type RenameMaterializedViewColumn = Reversible; diff --git a/src/operations/operators/addToOperatorFamily.ts b/src/operations/operators/addToOperatorFamily.ts index ed546aa8..7ab76337 100644 --- a/src/operations/operators/addToOperatorFamily.ts +++ b/src/operations/operators/addToOperatorFamily.ts @@ -8,7 +8,7 @@ export type AddToOperatorFamilyFn = ( operatorFamilyName: Name, indexMethod: Name, operatorList: OperatorListDefinition[] -) => string | string[]; +) => string; export type AddToOperatorFamily = Reversible; diff --git a/src/operations/operators/createOperator.ts b/src/operations/operators/createOperator.ts index b4c0e390..0a1e49eb 100644 --- a/src/operations/operators/createOperator.ts +++ b/src/operations/operators/createOperator.ts @@ -26,7 +26,7 @@ export interface CreateOperatorOptions { export type CreateOperatorFn = ( operatorName: Name, options: CreateOperatorOptions & DropOperatorOptions -) => string | string[]; +) => string; export type CreateOperator = Reversible; diff --git a/src/operations/operators/createOperatorClass.ts b/src/operations/operators/createOperatorClass.ts index c7cbcb81..1e507565 100644 --- a/src/operations/operators/createOperatorClass.ts +++ b/src/operations/operators/createOperatorClass.ts @@ -17,7 +17,7 @@ export type CreateOperatorClassFn = ( indexMethod: Name, operatorList: OperatorListDefinition[], options: CreateOperatorClassOptions & DropOptions -) => string | string[]; +) => string; export type CreateOperatorClass = Reversible; diff --git a/src/operations/operators/createOperatorFamily.ts b/src/operations/operators/createOperatorFamily.ts index 1f5615fc..5f6ef32e 100644 --- a/src/operations/operators/createOperatorFamily.ts +++ b/src/operations/operators/createOperatorFamily.ts @@ -6,7 +6,7 @@ export type CreateOperatorFamilyFn = ( operatorFamilyName: Name, indexMethod: Name, options?: DropOptions -) => string | string[]; +) => string; export type CreateOperatorFamily = Reversible; diff --git a/src/operations/operators/dropOperator.ts b/src/operations/operators/dropOperator.ts index d4328342..f6b2bbc6 100644 --- a/src/operations/operators/dropOperator.ts +++ b/src/operations/operators/dropOperator.ts @@ -10,7 +10,7 @@ export interface DropOperatorOptions extends DropOptions { export type DropOperator = ( operatorName: Name, dropOptions?: DropOperatorOptions -) => string | string[]; +) => string; export function dropOperator(mOptions: MigrationOptions): DropOperator { const _drop: DropOperator = (operatorName, options = {}) => { diff --git a/src/operations/operators/dropOperatorClass.ts b/src/operations/operators/dropOperatorClass.ts index 015dd221..d92ca7f9 100644 --- a/src/operations/operators/dropOperatorClass.ts +++ b/src/operations/operators/dropOperatorClass.ts @@ -5,7 +5,7 @@ export type DropOperatorClass = ( operatorClassName: Name, indexMethod: Name, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropOperatorClass( mOptions: MigrationOptions diff --git a/src/operations/operators/dropOperatorFamily.ts b/src/operations/operators/dropOperatorFamily.ts index 70b2b549..d123002c 100644 --- a/src/operations/operators/dropOperatorFamily.ts +++ b/src/operations/operators/dropOperatorFamily.ts @@ -5,7 +5,7 @@ export type DropOperatorFamily = ( operatorFamilyName: Name, newSchemaName: Name, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropOperatorFamily( mOptions: MigrationOptions diff --git a/src/operations/operators/removeFromOperatorFamily.ts b/src/operations/operators/removeFromOperatorFamily.ts index 59bce90a..3a597702 100644 --- a/src/operations/operators/removeFromOperatorFamily.ts +++ b/src/operations/operators/removeFromOperatorFamily.ts @@ -7,7 +7,7 @@ export type RemoveFromOperatorFamily = ( operatorFamilyName: Name, indexMethod: Name, operatorList: OperatorListDefinition[] -) => string | string[]; +) => string; export const removeFromOperatorFamily = ( mOptions: MigrationOptions diff --git a/src/operations/operators/renameOperatorClass.ts b/src/operations/operators/renameOperatorClass.ts index a56c1364..24942ca3 100644 --- a/src/operations/operators/renameOperatorClass.ts +++ b/src/operations/operators/renameOperatorClass.ts @@ -5,7 +5,7 @@ export type RenameOperatorClassFn = ( oldOperatorClassName: Name, indexMethod: Name, newOperatorClassName: Name -) => string | string[]; +) => string; export type RenameOperatorClass = Reversible; diff --git a/src/operations/operators/renameOperatorFamily.ts b/src/operations/operators/renameOperatorFamily.ts index d6ff088c..e65652bb 100644 --- a/src/operations/operators/renameOperatorFamily.ts +++ b/src/operations/operators/renameOperatorFamily.ts @@ -5,7 +5,7 @@ export type RenameOperatorFamilyFn = ( oldOperatorFamilyName: Name, indexMethod: Name, newOperatorFamilyName: Name -) => string | string[]; +) => string; export type RenameOperatorFamily = Reversible; diff --git a/src/operations/policies/alterPolicy.ts b/src/operations/policies/alterPolicy.ts index a63e16d8..7e586c3f 100644 --- a/src/operations/policies/alterPolicy.ts +++ b/src/operations/policies/alterPolicy.ts @@ -7,7 +7,7 @@ export type AlterPolicy = ( tableName: Name, policyName: string, options: PolicyOptions -) => string | string[]; +) => string; export function alterPolicy(mOptions: MigrationOptions): AlterPolicy { const _alter: AlterPolicy = (tableName, policyName, options = {}) => { diff --git a/src/operations/policies/createPolicy.ts b/src/operations/policies/createPolicy.ts index 0eaee0b4..483096b7 100644 --- a/src/operations/policies/createPolicy.ts +++ b/src/operations/policies/createPolicy.ts @@ -14,7 +14,7 @@ type CreatePolicyFn = ( tableName: Name, policyName: string, options?: CreatePolicyOptions & IfExistsOption -) => string | string[]; +) => string; export type CreatePolicy = Reversible; diff --git a/src/operations/policies/dropPolicy.ts b/src/operations/policies/dropPolicy.ts index c4683778..0643e959 100644 --- a/src/operations/policies/dropPolicy.ts +++ b/src/operations/policies/dropPolicy.ts @@ -5,7 +5,7 @@ export type DropPolicy = ( tableName: Name, policyName: string, options?: IfExistsOption -) => string | string[]; +) => string; export function dropPolicy(mOptions: MigrationOptions): DropPolicy { const _drop: DropPolicy = (tableName, policyName, options = {}) => { diff --git a/src/operations/policies/renamePolicy.ts b/src/operations/policies/renamePolicy.ts index e80a5520..a474cd70 100644 --- a/src/operations/policies/renamePolicy.ts +++ b/src/operations/policies/renamePolicy.ts @@ -5,7 +5,7 @@ export type RenamePolicyFn = ( tableName: Name, policyName: string, newPolicyName: string -) => string | string[]; +) => string; export type RenamePolicy = Reversible; diff --git a/src/operations/roles/alterRole.ts b/src/operations/roles/alterRole.ts index e41c546c..efa35d8a 100644 --- a/src/operations/roles/alterRole.ts +++ b/src/operations/roles/alterRole.ts @@ -3,10 +3,7 @@ import type { Name } from '../generalTypes'; import type { RoleOptions } from './shared'; import { formatRoleOptions } from './shared'; -export type AlterRole = ( - roleName: Name, - roleOptions: RoleOptions -) => string | string[]; +export type AlterRole = (roleName: Name, roleOptions: RoleOptions) => string; export function alterRole(mOptions: MigrationOptions): AlterRole { const _alter: AlterRole = (roleName, roleOptions = {}) => { diff --git a/src/operations/roles/createRole.ts b/src/operations/roles/createRole.ts index 48414f8f..ac3e43bb 100644 --- a/src/operations/roles/createRole.ts +++ b/src/operations/roles/createRole.ts @@ -7,7 +7,7 @@ import { formatRoleOptions } from './shared'; export type CreateRoleFn = ( roleName: Name, roleOptions?: RoleOptions & IfExistsOption -) => string | string[]; +) => string; export type CreateRole = Reversible; diff --git a/src/operations/roles/dropRole.ts b/src/operations/roles/dropRole.ts index 1547aebd..a37df92b 100644 --- a/src/operations/roles/dropRole.ts +++ b/src/operations/roles/dropRole.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { IfExistsOption, Name } from '../generalTypes'; -export type DropRole = ( - roleName: Name, - options?: IfExistsOption -) => string | string[]; +export type DropRole = (roleName: Name, options?: IfExistsOption) => string; export function dropRole(mOptions: MigrationOptions): DropRole { const _drop: DropRole = (roleName, options = {}) => { diff --git a/src/operations/roles/renameRole.ts b/src/operations/roles/renameRole.ts index c0ff981d..fb010f4b 100644 --- a/src/operations/roles/renameRole.ts +++ b/src/operations/roles/renameRole.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { Name, Reversible } from '../generalTypes'; -export type RenameRoleFn = ( - oldRoleName: Name, - newRoleName: Name -) => string | string[]; +export type RenameRoleFn = (oldRoleName: Name, newRoleName: Name) => string; export type RenameRole = Reversible; diff --git a/src/operations/schemas/createSchema.ts b/src/operations/schemas/createSchema.ts index c5785873..76b6d6ae 100644 --- a/src/operations/schemas/createSchema.ts +++ b/src/operations/schemas/createSchema.ts @@ -13,7 +13,7 @@ export interface CreateSchemaOptions extends IfNotExistsOption { export type CreateSchemaFn = ( schemaName: string, schemaOptions?: CreateSchemaOptions & DropOptions -) => string | string[]; +) => string; export type CreateSchema = Reversible; diff --git a/src/operations/schemas/dropSchema.ts b/src/operations/schemas/dropSchema.ts index 82e585e5..2e99cb68 100644 --- a/src/operations/schemas/dropSchema.ts +++ b/src/operations/schemas/dropSchema.ts @@ -4,7 +4,7 @@ import type { DropOptions } from '../generalTypes'; export type DropSchema = ( schemaName: string, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropSchema(mOptions: MigrationOptions): DropSchema { const _drop: DropSchema = (schemaName, options = {}) => { diff --git a/src/operations/schemas/renameSchema.ts b/src/operations/schemas/renameSchema.ts index d2bddd9c..73ae6fec 100644 --- a/src/operations/schemas/renameSchema.ts +++ b/src/operations/schemas/renameSchema.ts @@ -4,7 +4,7 @@ import type { Reversible } from '../generalTypes'; export type RenameSchemaFn = ( oldSchemaName: string, newSchemaName: string -) => string | string[]; +) => string; export type RenameSchema = Reversible; diff --git a/src/operations/sequences/alterSequence.ts b/src/operations/sequences/alterSequence.ts index 8110f34e..dd0fbf35 100644 --- a/src/operations/sequences/alterSequence.ts +++ b/src/operations/sequences/alterSequence.ts @@ -10,7 +10,7 @@ export interface SequenceOptionsAlter extends SequenceOptions { export type AlterSequence = ( sequenceName: Name, sequenceOptions: SequenceOptionsAlter -) => string | string[]; +) => string; export function alterSequence(mOptions: MigrationOptions): AlterSequence { return (sequenceName, options) => { diff --git a/src/operations/sequences/createSequence.ts b/src/operations/sequences/createSequence.ts index f73f2041..33567364 100644 --- a/src/operations/sequences/createSequence.ts +++ b/src/operations/sequences/createSequence.ts @@ -18,7 +18,7 @@ export interface SequenceOptionsCreate export type CreateSequenceFn = ( sequenceName: Name, sequenceOptions?: SequenceOptionsCreate & DropOptions -) => string | string[]; +) => string; export type CreateSequence = Reversible; diff --git a/src/operations/sequences/dropSequence.ts b/src/operations/sequences/dropSequence.ts index 6b006ff4..da3c0891 100644 --- a/src/operations/sequences/dropSequence.ts +++ b/src/operations/sequences/dropSequence.ts @@ -4,7 +4,7 @@ import type { DropOptions, Name } from '../generalTypes'; export type DropSequence = ( sequenceName: Name, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropSequence(mOptions: MigrationOptions): DropSequence { const _drop: DropSequence = (sequenceName, options = {}) => { diff --git a/src/operations/sequences/renameSequence.ts b/src/operations/sequences/renameSequence.ts index 0b44af1b..79ea861d 100644 --- a/src/operations/sequences/renameSequence.ts +++ b/src/operations/sequences/renameSequence.ts @@ -4,7 +4,7 @@ import type { Name, Reversible } from '../generalTypes'; export type RenameSequenceFn = ( oldSequenceName: Name, newSequenceName: Name -) => string | string[]; +) => string; export type RenameSequence = Reversible; diff --git a/src/operations/sql.ts b/src/operations/sql.ts index a6d744c7..fb3c02c0 100644 --- a/src/operations/sql.ts +++ b/src/operations/sql.ts @@ -5,7 +5,7 @@ import type { Name, Value } from './generalTypes'; export type Sql = ( sqlStr: string, args?: { [key: string]: Name | Value } -) => string | string[]; +) => string; export function sql(mOptions: MigrationOptions): Sql { const t = createTransformer(mOptions.literal); diff --git a/src/operations/tables/addColumns.ts b/src/operations/tables/addColumns.ts index a5252305..a27b35db 100644 --- a/src/operations/tables/addColumns.ts +++ b/src/operations/tables/addColumns.ts @@ -14,7 +14,7 @@ export type AddColumnsFn = ( tableName: Name, newColumns: ColumnDefinitions, addOptions?: IfNotExistsOption & DropOptions -) => string | string[]; +) => string; export type AddColumns = Reversible; diff --git a/src/operations/tables/addConstraint.ts b/src/operations/tables/addConstraint.ts index c9e66b50..86557b4d 100644 --- a/src/operations/tables/addConstraint.ts +++ b/src/operations/tables/addConstraint.ts @@ -9,7 +9,7 @@ export type CreateConstraintFn = ( tableName: Name, constraintName: string | null, expression: string | (ConstraintOptions & DropOptions) -) => string | string[]; +) => string; export type CreateConstraint = Reversible; diff --git a/src/operations/tables/alterColumn.ts b/src/operations/tables/alterColumn.ts index 0d68a5f3..9c2e1cea 100644 --- a/src/operations/tables/alterColumn.ts +++ b/src/operations/tables/alterColumn.ts @@ -36,7 +36,7 @@ export type AlterColumn = ( tableName: Name, columnName: string, options: AlterColumnOptions -) => string | string[]; +) => string; export function alterColumn(mOptions: MigrationOptions): AlterColumn { return (tableName, columnName, options) => { diff --git a/src/operations/tables/alterTable.ts b/src/operations/tables/alterTable.ts index 6700589d..86fa2036 100644 --- a/src/operations/tables/alterTable.ts +++ b/src/operations/tables/alterTable.ts @@ -9,7 +9,7 @@ export interface AlterTableOptions { export type AlterTable = ( tableName: Name, alterOptions: AlterTableOptions -) => string | string[]; +) => string; export function alterTable(mOptions: MigrationOptions): AlterTable { const _alter: AlterTable = (tableName, options) => { diff --git a/src/operations/tables/createTable.ts b/src/operations/tables/createTable.ts index 4b7db4d2..34ef68bf 100644 --- a/src/operations/tables/createTable.ts +++ b/src/operations/tables/createTable.ts @@ -13,7 +13,7 @@ export type CreateTableFn = ( tableName: Name, columns: ColumnDefinitions, options?: TableOptions & DropOptions -) => string | string[]; +) => string; export type CreateTable = Reversible; diff --git a/src/operations/tables/dropColumns.ts b/src/operations/tables/dropColumns.ts index fb451f7e..4a62c810 100644 --- a/src/operations/tables/dropColumns.ts +++ b/src/operations/tables/dropColumns.ts @@ -6,7 +6,7 @@ export type DropColumns = ( tableName: Name, columns: string | string[] | { [name: string]: unknown }, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropColumns(mOptions: MigrationOptions): DropColumns { const _drop: DropColumns = (tableName, columns, options = {}) => { diff --git a/src/operations/tables/dropConstraint.ts b/src/operations/tables/dropConstraint.ts index 874eaab3..e729ca40 100644 --- a/src/operations/tables/dropConstraint.ts +++ b/src/operations/tables/dropConstraint.ts @@ -5,7 +5,7 @@ export type DropConstraint = ( tableName: Name, constraintName: string, options?: DropOptions -) => string | string[]; +) => string; export function dropConstraint(mOptions: MigrationOptions): DropConstraint { const _drop: DropConstraint = (tableName, constraintName, options = {}) => { diff --git a/src/operations/tables/dropTable.ts b/src/operations/tables/dropTable.ts index 40c9fc40..06808fbf 100644 --- a/src/operations/tables/dropTable.ts +++ b/src/operations/tables/dropTable.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { DropOptions, Name } from '../generalTypes'; -export type DropTable = ( - tableName: Name, - dropOptions?: DropOptions -) => string | string[]; +export type DropTable = (tableName: Name, dropOptions?: DropOptions) => string; export function dropTable(mOptions: MigrationOptions): DropTable { const _drop: DropTable = (tableName, options = {}) => { diff --git a/src/operations/tables/renameColumn.ts b/src/operations/tables/renameColumn.ts index 944ca893..2b12a1a4 100644 --- a/src/operations/tables/renameColumn.ts +++ b/src/operations/tables/renameColumn.ts @@ -5,7 +5,7 @@ export type RenameColumnFn = ( tableName: Name, oldColumnName: string, newColumnName: string -) => string | string[]; +) => string; export type RenameColumn = Reversible; diff --git a/src/operations/tables/renameConstraint.ts b/src/operations/tables/renameConstraint.ts index d58fe8da..59cbc5cf 100644 --- a/src/operations/tables/renameConstraint.ts +++ b/src/operations/tables/renameConstraint.ts @@ -5,7 +5,7 @@ export type RenameConstraintFn = ( tableName: Name, oldConstraintName: string, newConstraintName: string -) => string | string[]; +) => string; export type RenameConstraint = Reversible; diff --git a/src/operations/tables/renameTable.ts b/src/operations/tables/renameTable.ts index 221c2158..c9c0b8bb 100644 --- a/src/operations/tables/renameTable.ts +++ b/src/operations/tables/renameTable.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { Name, Reversible } from '../generalTypes'; -export type RenameTableFn = ( - tableName: Name, - newtableName: Name -) => string | string[]; +export type RenameTableFn = (tableName: Name, newtableName: Name) => string; export type RenameTable = Reversible; diff --git a/src/operations/triggers/createTrigger.ts b/src/operations/triggers/createTrigger.ts index 44de57f6..f0a5f644 100644 --- a/src/operations/triggers/createTrigger.ts +++ b/src/operations/triggers/createTrigger.ts @@ -10,14 +10,14 @@ export type CreateTriggerFn1 = ( tableName: Name, triggerName: string, triggerOptions: TriggerOptions & DropOptions -) => string | string[]; +) => string; export type CreateTriggerFn2 = ( tableName: Name, triggerName: string, triggerOptions: TriggerOptions & FunctionOptions & DropOptions, definition: Value -) => string | string[]; +) => string; export type CreateTriggerFn = CreateTriggerFn1 | CreateTriggerFn2; diff --git a/src/operations/triggers/dropTrigger.ts b/src/operations/triggers/dropTrigger.ts index 1fe2ebe9..17b6fe79 100644 --- a/src/operations/triggers/dropTrigger.ts +++ b/src/operations/triggers/dropTrigger.ts @@ -5,7 +5,7 @@ export type DropTrigger = ( tableName: Name, triggerName: string, dropOptions?: DropOptions -) => string | string[]; +) => string; export function dropTrigger(mOptions: MigrationOptions): DropTrigger { const _drop: DropTrigger = (tableName, triggerName, options = {}) => { diff --git a/src/operations/triggers/renameTrigger.ts b/src/operations/triggers/renameTrigger.ts index d1665048..91dda54a 100644 --- a/src/operations/triggers/renameTrigger.ts +++ b/src/operations/triggers/renameTrigger.ts @@ -5,7 +5,7 @@ export type RenameTriggerFn = ( tableName: Name, oldTriggerName: string, newTriggerName: string -) => string | string[]; +) => string; export type RenameTrigger = Reversible; diff --git a/src/operations/types/addTypeAttribute.ts b/src/operations/types/addTypeAttribute.ts index 909aa83a..5deb5547 100644 --- a/src/operations/types/addTypeAttribute.ts +++ b/src/operations/types/addTypeAttribute.ts @@ -7,7 +7,7 @@ export type AddTypeAttributeFn = ( typeName: Name, attributeName: string, attributeType: Type & IfExistsOption -) => string | string[]; +) => string; export type AddTypeAttribute = Reversible; diff --git a/src/operations/types/addTypeValue.ts b/src/operations/types/addTypeValue.ts index 73f7ec96..d4b9f8c2 100644 --- a/src/operations/types/addTypeValue.ts +++ b/src/operations/types/addTypeValue.ts @@ -12,7 +12,7 @@ export type AddTypeValue = ( typeName: Name, value: Value, options?: AddTypeValueOptions -) => string | string[]; +) => string; export function addTypeValue(mOptions: MigrationOptions): AddTypeValue { const _add: AddTypeValue = (typeName, value, options = {}) => { diff --git a/src/operations/types/createType.ts b/src/operations/types/createType.ts index a113bafc..bfc6fd85 100644 --- a/src/operations/types/createType.ts +++ b/src/operations/types/createType.ts @@ -12,7 +12,7 @@ import { dropType } from './dropType'; export type CreateTypeFn = ( typeName: Name, values: (Value[] | { [name: string]: Type }) & DropOptions -) => string | string[]; +) => string; export type CreateType = Reversible; diff --git a/src/operations/types/dropType.ts b/src/operations/types/dropType.ts index 2d8269cd..1d96696d 100644 --- a/src/operations/types/dropType.ts +++ b/src/operations/types/dropType.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { DropOptions, Name } from '../generalTypes'; -export type DropType = ( - typeName: Name, - dropOptions?: DropOptions -) => string | string[]; +export type DropType = (typeName: Name, dropOptions?: DropOptions) => string; export function dropType(mOptions: MigrationOptions): DropType { const _drop: DropType = (typeName, options = {}) => { diff --git a/src/operations/types/dropTypeAttribute.ts b/src/operations/types/dropTypeAttribute.ts index bf22ab71..dade8e77 100644 --- a/src/operations/types/dropTypeAttribute.ts +++ b/src/operations/types/dropTypeAttribute.ts @@ -5,7 +5,7 @@ export type DropTypeAttribute = ( typeName: Name, attributeName: string, options: IfExistsOption -) => string | string[]; +) => string; export function dropTypeAttribute( mOptions: MigrationOptions diff --git a/src/operations/types/renameType.ts b/src/operations/types/renameType.ts index 3dfb587d..b4127e00 100644 --- a/src/operations/types/renameType.ts +++ b/src/operations/types/renameType.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { Name, Reversible } from '../generalTypes'; -export type RenameTypeFn = ( - typeName: Name, - newTypeName: Name -) => string | string[]; +export type RenameTypeFn = (typeName: Name, newTypeName: Name) => string; export type RenameType = Reversible; diff --git a/src/operations/types/renameTypeAttribute.ts b/src/operations/types/renameTypeAttribute.ts index dc800d33..0b76d617 100644 --- a/src/operations/types/renameTypeAttribute.ts +++ b/src/operations/types/renameTypeAttribute.ts @@ -5,7 +5,7 @@ export type RenameTypeAttributeFn = ( typeName: Name, attributeName: string, newAttributeName: string -) => string | string[]; +) => string; export type RenameTypeAttribute = Reversible; diff --git a/src/operations/types/renameTypeValue.ts b/src/operations/types/renameTypeValue.ts index 2c903475..05f06e34 100644 --- a/src/operations/types/renameTypeValue.ts +++ b/src/operations/types/renameTypeValue.ts @@ -6,7 +6,7 @@ export type RenameTypeValueFn = ( typeName: Name, value: string, newValue: string -) => string | string[]; +) => string; export type RenameTypeValue = Reversible; diff --git a/src/operations/types/setTypeAttribute.ts b/src/operations/types/setTypeAttribute.ts index 054f87b3..f460bfac 100644 --- a/src/operations/types/setTypeAttribute.ts +++ b/src/operations/types/setTypeAttribute.ts @@ -6,7 +6,7 @@ export type SetTypeAttribute = ( typeName: Name, attributeName: string, attributeType: Type -) => string | string[]; +) => string; export function setTypeAttribute(mOptions: MigrationOptions): SetTypeAttribute { return (typeName, attributeName, attributeType) => { diff --git a/src/operations/views/alterView.ts b/src/operations/views/alterView.ts index dd3a0f99..f41a97e2 100644 --- a/src/operations/views/alterView.ts +++ b/src/operations/views/alterView.ts @@ -3,10 +3,7 @@ import type { Name, Nullable } from '../generalTypes'; import type { ViewOptions } from './shared'; import { viewOptionStr } from './shared'; -export type AlterView = ( - viewName: Name, - options: AlterViewOptions -) => string | string[]; +export type AlterView = (viewName: Name, options: AlterViewOptions) => string; export interface AlterViewOptions { checkOption?: null | 'CASCADED' | 'LOCAL'; diff --git a/src/operations/views/alterViewColumn.ts b/src/operations/views/alterViewColumn.ts index 5cdfcb65..4ae278ad 100644 --- a/src/operations/views/alterViewColumn.ts +++ b/src/operations/views/alterViewColumn.ts @@ -10,7 +10,7 @@ export type AlterViewColumn = ( viewName: Name, columnName: string, options: AlterViewColumnOptions -) => string | string[]; +) => string; export function alterViewColumn(mOptions: MigrationOptions): AlterViewColumn { const _alter: AlterViewColumn = (viewName, columnName, options) => { diff --git a/src/operations/views/createView.ts b/src/operations/views/createView.ts index 506278a8..eba9fa0b 100644 --- a/src/operations/views/createView.ts +++ b/src/operations/views/createView.ts @@ -23,7 +23,7 @@ export type CreateViewFn = ( viewName: Name, options: CreateViewOptions & DropOptions, definition: string -) => string | string[]; +) => string; export type CreateView = Reversible; diff --git a/src/operations/views/dropView.ts b/src/operations/views/dropView.ts index 63474ad7..73de3cf3 100644 --- a/src/operations/views/dropView.ts +++ b/src/operations/views/dropView.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { DropOptions, Name } from '../generalTypes'; -export type DropView = ( - viewName: Name, - options?: DropOptions -) => string | string[]; +export type DropView = (viewName: Name, options?: DropOptions) => string; export function dropView(mOptions: MigrationOptions): DropView { const _drop: DropView = (viewName, options = {}) => { diff --git a/src/operations/views/renameView.ts b/src/operations/views/renameView.ts index 131257f9..afefabaa 100644 --- a/src/operations/views/renameView.ts +++ b/src/operations/views/renameView.ts @@ -1,10 +1,7 @@ import type { MigrationOptions } from '../../types'; import type { Name, Reversible } from '../generalTypes'; -export type RenameViewFn = ( - viewName: Name, - newViewName: Name -) => string | string[]; +export type RenameViewFn = (viewName: Name, newViewName: Name) => string; export type RenameView = Reversible;