Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FieldH2 (0.1 sec)

  1. tests/migrate_test.go

    // https://github.com/go-gorm/gorm/issues/4760
    func TestMigrateAutoIncrement(t *testing.T) {
    	type AutoIncrementStruct struct {
    		ID     int64   `gorm:"primarykey;autoIncrement"`
    		Field1 uint32  `gorm:"column:field1"`
    		Field2 float32 `gorm:"column:field2"`
    	}
    
    	if err := DB.AutoMigrate(&AutoIncrementStruct{}); err != nil {
    		t.Fatalf("AutoMigrate err: %v", err)
    	}
    
    	const ROWS = 10
    	for idx := 0; idx < ROWS; idx++ {
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
Back to top