postgresql
This commit is contained in:
54
storage/postgresql/schema.hcl
Normal file
54
storage/postgresql/schema.hcl
Normal 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" {
|
||||
}
|
||||
Reference in New Issue
Block a user