groups-management/storage/postgresql/schema.hcl

52 lines
882 B
HCL
Raw Normal View History

2023-05-02 18:33:46 +00:00
table "group_members" {
schema = schema.groups_management
column "id" {
null = false
type = uuid
}
column "member_id" {
null = true
type = uuid
}
column "group_id" {
null = true
type = uuid
}
column "data" {
null = true
type = jsonb
}
primary_key {
columns = [column.id]
}
foreign_key "group_members_group_id_fkey" {
columns = [column.group_id]
ref_columns = [table.groups.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
}
table "groups" {
schema = schema.groups_management
column "id" {
null = false
type = uuid
}
column "namespace" {
null = true
type = text
}
column "members" {
null = true
type = sql("text[]")
}
column "data" {
null = true
type = jsonb
}
primary_key {
columns = [column.id]
}
}
schema "groups_management" {
}