added pseudorandom generator
This commit is contained in:
+2
-2
@@ -530,7 +530,7 @@ func (dao *Dao) SyncRecordTableSchema(newCollection *models.Collection, oldColle
|
||||
// This way we are always doing 1 more rename operation but it provides better dev experience.
|
||||
|
||||
if oldField == nil {
|
||||
tempName := field.Name + security.RandomString(5)
|
||||
tempName := field.Name + security.PseudoRandomString(5)
|
||||
toRename[tempName] = field.Name
|
||||
|
||||
// add
|
||||
@@ -539,7 +539,7 @@ func (dao *Dao) SyncRecordTableSchema(newCollection *models.Collection, oldColle
|
||||
return err
|
||||
}
|
||||
} else if oldField.Name != field.Name {
|
||||
tempName := field.Name + security.RandomString(5)
|
||||
tempName := field.Name + security.PseudoRandomString(5)
|
||||
toRename[tempName] = field.Name
|
||||
|
||||
// rename
|
||||
|
||||
@@ -129,7 +129,7 @@ func (dao *Dao) expandRecords(records []*models.Record, expandPath string, fetch
|
||||
}
|
||||
// indirect relation
|
||||
relField = &schema.SchemaField{
|
||||
Id: "indirect_" + security.RandomString(3),
|
||||
Id: "indirect_" + security.PseudoRandomString(5),
|
||||
Type: schema.FieldTypeRelation,
|
||||
Name: parts[0],
|
||||
Options: relFieldOptions,
|
||||
|
||||
Reference in New Issue
Block a user