···2525the regular user. There is no concept of running a separate set of migrations
2626under more privileged database user.
27272828+For database performance with many labels, it is important that `LC_COLLATE=C`.
2929+That is, the string sort behavior must be by byte order.
3030+2831## Keyword Labeler
29323033A trivial keyword filter labeler is included. To configure it, create a JSON
···121121 Host: "http://" + pds.Host,
122122 }
123123}
124124+125125+// The CreatedAt column corresponds to the 'cat' timestamp on label records. The UpdatedAt column is database-specific.
126126+//
127127+// NOTE: to get fast string-prefix queries on Uri via the idx_uri_src_val_cid index, it is important that the PostgreSQL LC_COLLATE="C"
128128+type Label struct {
129129+ ID uint64 `gorm:"primaryKey"`
130130+ Uri string `gorm:"uniqueIndex:idx_uri_src_val_cid;not null"`
131131+ SourceDid string `gorm:"uniqueIndex:idx_uri_src_val_cid;uniqueIndex:idx_src_rkey;not null"`
132132+ Val string `gorm:"uniqueIndex:idx_uri_src_val_cid;not null"`
133133+ Cid *string `gorm:"uniqueIndex:idx_uri_src_val_cid"`
134134+ RepoRKey *string `gorm:"uniqueIndex:idx_src_rkey"`
135135+ CreatedAt time.Time
136136+ UpdatedAt time.Time
137137+}