增加Taber实现校验
This commit is contained in:
@@ -263,18 +263,26 @@ func (ps *PostgresStorage) creatingIndex(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// uniqueIndexDefinition 结构体定义了唯一索引的详细信息
|
||||
type uniqueIndexDefinition struct {
|
||||
tableName string // 索引所属的表名
|
||||
columns []string // 构成唯一索引的列名
|
||||
indexName string // 唯一索引的名称
|
||||
whereClause string // 可选的 WHERE 子句,用于创建部分索引
|
||||
description string // 索引的描述,用于日志记录
|
||||
}
|
||||
|
||||
// ginIndexDefinition 结构体定义了 GIN 索引的详细信息
|
||||
type ginIndexDefinition struct {
|
||||
tableName string // 索引所属的表名
|
||||
columnName string // 需要创建 GIN 索引的列名
|
||||
indexName string // GIN 索引的名称
|
||||
description string // 索引的描述,用于日志记录
|
||||
}
|
||||
|
||||
func (ps *PostgresStorage) creatingUniqueIndex(ctx context.Context) error {
|
||||
storageCtx, logger := logs.Trace(ctx, ps.ctx, "creatingUniqueIndex")
|
||||
|
||||
// uniqueIndexDefinition 结构体定义了唯一索引的详细信息
|
||||
type uniqueIndexDefinition struct {
|
||||
tableName string // 索引所属的表名
|
||||
columns []string // 构成唯一索引的列名
|
||||
indexName string // 唯一索引的名称
|
||||
whereClause string // 可选的 WHERE 子句,用于创建部分索引
|
||||
description string // 索引的描述,用于日志记录
|
||||
}
|
||||
|
||||
// 定义所有需要创建的唯一索引
|
||||
uniqueIndexesToCreate := []uniqueIndexDefinition{
|
||||
{
|
||||
@@ -392,14 +400,6 @@ func (ps *PostgresStorage) creatingUniqueIndex(ctx context.Context) error {
|
||||
func (ps *PostgresStorage) createGinIndexes(ctx context.Context) error {
|
||||
storageCtx, logger := logs.Trace(ctx, ps.ctx, "createGinIndexes")
|
||||
|
||||
// ginIndexDefinition 结构体定义了 GIN 索引的详细信息
|
||||
type ginIndexDefinition struct {
|
||||
tableName string // 索引所属的表名
|
||||
columnName string // 需要创建 GIN 索引的列名
|
||||
indexName string // GIN 索引的名称
|
||||
description string // 索引的描述,用于日志记录
|
||||
}
|
||||
|
||||
// 定义所有需要创建的 GIN 索引
|
||||
ginIndexesToCreate := []ginIndexDefinition{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user