docs
docs copied to clipboard
Disable timestamp fields for many_to_many relation table
I have two tables called tags and cards There is also a table called card_tags for making relation between cards and their tags I have disabled timestamp fields for the relation table because they are really unnecessary and i created a model CardTag with following content:
package models
type CardTag struct {
CardId int64 `json:"card_id" db:"card_id"`
TagId int64 `json:"tag_id" db:"tag_id"`
}
But in runtime sounds like the framework is not using above model and gives this error:
pq: column "created_at" of relation "card_tags" does not exist.
Is there a way to disable timestamps for this table ?
Thanks.