MySQL id column name

Hi, I have existing mySQL database with id column named “test_id” (primary key) .
If I define table like this:

func GetTestTable(ctx *context.Context) table.Table {

	test := table.NewDefaultTable(table.DefaultConfigWithDriver("mysql"))

	info := test.GetInfo().HideFilterArea()

	info.AddField("Test_id", "test_id", db.Int)
	info.AddField("Test_name", "test_name", db.Varchar)
	info.AddField("Test_description", "test_description", db.Text)


	formList := test.GetForm()
	formList.AddField("Test_id", "test_id", db.Int, form.Number)
	formList.AddField("Test_name", "test_name", db.Varchar, form.Text)
	formList.AddField("Test_description", "test_description", db.Text, form.Text)


	return test

I am getting error:

Error 1054: Unknown column ‘’ in ‘field list’

How can I fix it? Is there a way that id field can be named differently and not “id” ?


@kljajo You can specify the primary key name like this:

xxxxTable = table.NewDefaultTable(table.DefaultConfig().SetPrimaryKey("Test_id", db.Int))