postgresql

This commit is contained in:
2023-05-02 20:33:46 +02:00
parent 5ef94ee074
commit 8629bc505b
7 changed files with 894 additions and 7 deletions

View File

@@ -0,0 +1,54 @@
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" {
}