当我测试gorm文档中的default标记时,创建数据表报错:

type User struct { ID string gorm:"default:uuid_generate_v3()" // db func FirstName string LastName string Age uint8 FullName string gorm:"->;type:GENERATED ALWAYS AS (concat(firstname,' ',lastname));default:(-);" } ... 然后 // 迁移 schema err = db.AutoMigrate(&User{}) 然后会报错如下: CREATE TABLE users (id varchar(191) DEFAULT uuid_generate_v3(),first_name longtext,last_name longtext,age tinyint unsigned,full_name GENERATED ALWAYS AS (concat(firstname,' ',lastname)),PRIMARY KEY (id)) panic: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uuid_generate_v3(),first_name longtext,last_name longtext,age tinyint unsi' at line 1

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking