'Gorm: How to set unsigned interger in tags

I have the following struct with which when I run AutoMigration I expect unsigned to be set on table field quantity quantity but it doesn't.

Here is the struct I use

type Item struct {
    ID           int        `json:"id" gorm:"primaryKey"`
    Quantity     int        `json:"quantity" gorm:"type:integer;not null;unsigned;"`

}

SQL generated without UNSIGNED

    "id" BIGINT NOT NULL DEFAULT 'nextval(''items_id_seq''::regclass)',
    "quantity" INTEGER NOT NULL,

How to make unsigned work with gorm and postgres? Any help will be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source