update dependencies (#6267)
Signed-off-by: hongming <coder.scala@gmail.com>
This commit is contained in:
24
vendor/helm.sh/helm/v3/pkg/storage/driver/sql.go
vendored
24
vendor/helm.sh/helm/v3/pkg/storage/driver/sql.go
vendored
@@ -72,8 +72,8 @@ const (
|
||||
|
||||
// Following limits based on k8s labels limits - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
|
||||
const (
|
||||
sqlCustomLabelsTableKeyMaxLenght = 253 + 1 + 63
|
||||
sqlCustomLabelsTableValueMaxLenght = 63
|
||||
sqlCustomLabelsTableKeyMaxLength = 253 + 1 + 63
|
||||
sqlCustomLabelsTableValueMaxLength = 63
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -98,9 +98,9 @@ func (s *SQL) Name() string {
|
||||
// Check if all migrations al
|
||||
func (s *SQL) checkAlreadyApplied(migrations []*migrate.Migration) bool {
|
||||
// make map (set) of ids for fast search
|
||||
migrationsIds := make(map[string]struct{})
|
||||
migrationsIDs := make(map[string]struct{})
|
||||
for _, migration := range migrations {
|
||||
migrationsIds[migration.Id] = struct{}{}
|
||||
migrationsIDs[migration.Id] = struct{}{}
|
||||
}
|
||||
|
||||
// get list of applied migrations
|
||||
@@ -113,15 +113,15 @@ func (s *SQL) checkAlreadyApplied(migrations []*migrate.Migration) bool {
|
||||
}
|
||||
|
||||
for _, record := range records {
|
||||
if _, ok := migrationsIds[record.Id]; ok {
|
||||
if _, ok := migrationsIDs[record.Id]; ok {
|
||||
s.Log("checkAlreadyApplied: found previous migration (Id: %v) applied at %v", record.Id, record.AppliedAt)
|
||||
delete(migrationsIds, record.Id)
|
||||
delete(migrationsIDs, record.Id)
|
||||
}
|
||||
}
|
||||
|
||||
// check if all migrations appliyed
|
||||
if len(migrationsIds) != 0 {
|
||||
for id := range migrationsIds {
|
||||
// check if all migrations applied
|
||||
if len(migrationsIDs) != 0 {
|
||||
for id := range migrationsIDs {
|
||||
s.Log("checkAlreadyApplied: find unapplied migration (id: %v)", id)
|
||||
}
|
||||
return false
|
||||
@@ -204,7 +204,7 @@ func (s *SQL) ensureDBSetup() error {
|
||||
CREATE TABLE %s (
|
||||
%s VARCHAR(64),
|
||||
%s VARCHAR(67),
|
||||
%s VARCHAR(%d),
|
||||
%s VARCHAR(%d),
|
||||
%s VARCHAR(%d)
|
||||
);
|
||||
CREATE INDEX ON %s (%s, %s);
|
||||
@@ -216,9 +216,9 @@ func (s *SQL) ensureDBSetup() error {
|
||||
sqlCustomLabelsTableReleaseKeyColumn,
|
||||
sqlCustomLabelsTableReleaseNamespaceColumn,
|
||||
sqlCustomLabelsTableKeyColumn,
|
||||
sqlCustomLabelsTableKeyMaxLenght,
|
||||
sqlCustomLabelsTableKeyMaxLength,
|
||||
sqlCustomLabelsTableValueColumn,
|
||||
sqlCustomLabelsTableValueMaxLenght,
|
||||
sqlCustomLabelsTableValueMaxLength,
|
||||
sqlCustomLabelsTableName,
|
||||
sqlCustomLabelsTableReleaseKeyColumn,
|
||||
sqlCustomLabelsTableReleaseNamespaceColumn,
|
||||
|
||||
Reference in New Issue
Block a user