110 lines
1.7 KiB
HCL
110 lines
1.7 KiB
HCL
|
table "event" {
|
||
|
schema = schema.agenda
|
||
|
column "id" {
|
||
|
null = false
|
||
|
type = uuid
|
||
|
}
|
||
|
column "namespace" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "owners" {
|
||
|
null = true
|
||
|
type = sql("text[]")
|
||
|
}
|
||
|
column "restricted_to" {
|
||
|
null = true
|
||
|
type = sql("text[]")
|
||
|
}
|
||
|
column "type" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "name" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "description" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "startdate" {
|
||
|
null = true
|
||
|
type = timestamptz
|
||
|
}
|
||
|
column "enddate" {
|
||
|
null = true
|
||
|
type = timestamptz
|
||
|
}
|
||
|
column "starttime" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "endtime" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "allday" {
|
||
|
null = true
|
||
|
type = boolean
|
||
|
}
|
||
|
column "maxsubscribers" {
|
||
|
null = true
|
||
|
type = bigint
|
||
|
}
|
||
|
column "data" {
|
||
|
null = true
|
||
|
type = jsonb
|
||
|
}
|
||
|
column "deleted" {
|
||
|
null = true
|
||
|
type = boolean
|
||
|
}
|
||
|
|
||
|
column "deletedsubscriptions" {
|
||
|
null = true
|
||
|
type = jsonb
|
||
|
}
|
||
|
primary_key {
|
||
|
columns = [column.id]
|
||
|
}
|
||
|
}
|
||
|
table "subscription" {
|
||
|
schema = schema.agenda
|
||
|
column "id" {
|
||
|
null = false
|
||
|
type = uuid
|
||
|
}
|
||
|
column "event_id" {
|
||
|
null = true
|
||
|
type = uuid
|
||
|
}
|
||
|
column "subscriber" {
|
||
|
null = true
|
||
|
type = text
|
||
|
}
|
||
|
column "tags" {
|
||
|
null = true
|
||
|
type = sql("text[]")
|
||
|
}
|
||
|
column "created_at" {
|
||
|
null = true
|
||
|
type = timestamptz
|
||
|
}
|
||
|
column "data" {
|
||
|
null = true
|
||
|
type = jsonb
|
||
|
}
|
||
|
primary_key {
|
||
|
columns = [column.id]
|
||
|
}
|
||
|
foreign_key "subscription_event_id_fkey" {
|
||
|
columns = [column.event_id]
|
||
|
ref_columns = [table.event.column.id]
|
||
|
on_update = NO_ACTION
|
||
|
on_delete = NO_ACTION
|
||
|
}
|
||
|
}
|
||
|
|
||
|
schema "agenda" {
|
||
|
}
|