fix(postgres): keep index operator classes in read and generation
Closes #7166
This commit is contained in:
31 files changed
+854
-51
No files matched your search
@@ -40,6 +40,7 @@ export function createDraftIndex(tableName: string, columns: string[], existingI
|
||||
includedColumns: [],
|
||||
comment: "",
|
||||
concurrently: false,
|
||||
columnOpclasses: [],
|
||||
markedForDrop: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ export interface EditableStructureIndex {
|
||||
comment: string;
|
||||
/** Build the index with PostgreSQL `CREATE INDEX CONCURRENTLY` (PostgreSQL only, default off). */
|
||||
concurrently?: boolean;
|
||||
/** Parallel to `columns`: operator class for each key column (PostgreSQL). `null` means default. */
|
||||
columnOpclasses?: (string | null)[];
|
||||
original?: IndexInfo;
|
||||
markedForDrop: boolean;
|
||||
}
|
||||
|
||||
@@ -1029,6 +1029,7 @@ export function createIndexDrafts(indexes: IndexInfo[]): EditableStructureIndex[
|
||||
indexType: normalizeStructureIndexType(index.index_type),
|
||||
includedColumns: index.included_columns ? [...index.included_columns] : [],
|
||||
comment: index.comment ?? "",
|
||||
columnOpclasses: index.column_opclasses ? [...index.column_opclasses] : [],
|
||||
original: index,
|
||||
markedForDrop: false,
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user