Excuse me, I'm creating a Casbin adapter with golang,postgresql and gorm, using
adapter, err := gormadapter.NewAdapterByDB(db)
automatically creates the table. When I run the program for the first time, everything works fine, but when I run the program again, I get an error.
pq: got 1 parameters but the statement requires 0
At the moment we can know that it is the error of a.db.AutoMigrate(t).
Tables are created automatically, and I don't understand why AutoMigrate fails. Please help me answer it
When I delete the Table from DataBase, run program again , everything works fine, but the second run is the same error