@@ -34,17 +34,18 @@ type myMigrator struct {
3434func (migrator myMigrator ) FullDataTypeOf (field * schema.Field ) clause.Expr {
3535 if field .DataType == "uuid" {
3636 field .DataType = "char(36)"
37- if field .HasDefaultValue && field .DefaultValue == "uuid_generate_v4()" {
38- field .HasDefaultValue = false
39- field .DefaultValue = ""
40- var fieldsWithDefault []* schema.Field
41- for _ , fieldWithDefault := range field .Schema .FieldsWithDefaultDBValue {
42- if fieldWithDefault .DBName != "id" {
43- fieldsWithDefault = append (fieldsWithDefault , fieldWithDefault )
44- }
45- }
46- field .Schema .FieldsWithDefaultDBValue = fieldsWithDefault
47- }
37+ // remove default value uuid_generate_v4(), see https://github.com/langgenius/dify-plugin-daemon/issues/469
38+ // if field.HasDefaultValue && field.DefaultValue == "uuid_generate_v4()" {
39+ // field.HasDefaultValue = false
40+ // field.DefaultValue = ""
41+ // var fieldsWithDefault []*schema.Field
42+ // for _, fieldWithDefault := range field.Schema.FieldsWithDefaultDBValue {
43+ // if fieldWithDefault.DBName != "id" {
44+ // fieldsWithDefault = append(fieldsWithDefault, fieldWithDefault)
45+ // }
46+ // }
47+ // field.Schema.FieldsWithDefaultDBValue = fieldsWithDefault
48+ // }
4849 } else if field .DataType == "text" {
4950 field .DataType = "longtext"
5051 }
0 commit comments