54 lines
902 B
HCL
54 lines
902 B
HCL
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" {
|
|
}
|
|
schema "public" {
|
|
} |