mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 01:52:01 +08:00

* fix: move migrations to bun * fix: use anonymous structs and move modes to types package * fix: minor changes after tests * fix: remove bun relations and add foreign keys * fix: minor changes * Update pkg/types/agent.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: address minor comments * fix: use bun create index * fix: remove extra comma --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
22 lines
668 B
Go
22 lines
668 B
Go
package types
|
|
|
|
import "github.com/uptrace/bun"
|
|
|
|
// on_delete:CASCADE,on_update:CASCADE not working
|
|
type UserPreference struct {
|
|
bun.BaseModel `bun:"table:user_preference"`
|
|
|
|
PreferenceID string `bun:"preference_id,type:text,pk"`
|
|
PreferenceValue string `bun:"preference_value,type:text"`
|
|
UserID string `bun:"user_id,type:text,pk"`
|
|
}
|
|
|
|
// on_delete:CASCADE,on_update:CASCADE not working
|
|
type OrgPreference struct {
|
|
bun.BaseModel `bun:"table:org_preference"`
|
|
|
|
PreferenceID string `bun:"preference_id,pk,type:text,notnull"`
|
|
PreferenceValue string `bun:"preference_value,type:text,notnull"`
|
|
OrgID string `bun:"org_id,pk,type:text,notnull"`
|
|
}
|