add table for hubs
This commit is contained in:
@@ -72,6 +72,18 @@ func Init(ctx context.Context) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_, err = dbConn.Exec(ctx, `
|
||||||
|
CREATE TABLE IF NOT EXISTS hubs (
|
||||||
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||||
|
name TEXT NOT NULL,
|
||||||
|
icon_url TEXT,
|
||||||
|
background_url TEXT,
|
||||||
|
creator UUID NOT NULL REFERENCES users(id),
|
||||||
|
join_role, // TODO set role uuid
|
||||||
|
rgba BIGINT NOT NULL DEFAULT 0 CHECK (rgba BETWEEN 0 AND 4294967295),
|
||||||
|
user_color_allowed BOOLEAN DEAFAULT FALSE
|
||||||
|
)
|
||||||
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
func UserSave(ctx context.Context, user *types.User) error {
|
func UserSave(ctx context.Context, user *types.User) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user