simple-crud/examples/schema.toml

110 lines
2.2 KiB
TOML

[public.entry_categories]
display_name = "Entry Categories"
[[public.entry_categories.columns]]
name = "entry_id"
type = "Integer"
not_null = true
reference = { table = "entries", identity = "id", label = "Entry Id" }
[[public.entry_categories.columns]]
name = "entry_date"
type = "Date"
not_null = true
reference = { table = "entries", identity = "id", label = "Entry Id" }
[[public.entry_categories.columns]]
name = "category_id"
type = "Integer"
not_null = true
reference = { table = "categories", identity = "id", label = "Category Id" }
[public.sources]
display_name = "Sources"
[[public.sources.columns]]
name = "id"
type = "Integer"
default = "nextval('sources_id_seq'::regclass)"
not_null = true
[[public.sources.columns]]
name = "name"
not_null = true
type = { Varchar = { length = 20 } }
[[public.sources.columns]]
name = "uid"
not_null = true
type = { Varchar = { length = 8 } }
[[public.sources.columns]]
name = "uri"
not_null = true
type = { Varchar = {} }
[[public.sources.columns]]
name = "created_at"
default = "CURRENT_TIMESTAMP"
not_null = true
type = { TimestampWithTimeZone = { precision = 6 } }
[[public.sources.columns]]
name = "updated_at"
not_null = false
type = { TimestampWithTimeZone = { precision = 6 } }
[[public.sources.columns]]
name = "deleted_at"
not_null = false
type = { TimestampWithTimeZone = { precision = 6 } }
[public.categories]
display_name = "Categories"
[[public.categories.columns]]
name = "id"
type = "Integer"
default = "nextval('category_id_seq'::regclass)"
not_null = true
[[public.categories.columns]]
name = "name"
not_null = true
type = { Varchar = { length = 20 } }
[[public.categories.columns]]
name = "uid"
not_null = false
type = { Varchar = { length = 8 } }
[public.entries]
display_name = "Entries"
[[public.entries.columns]]
name = "id"
type = "Integer"
default = "nextval('entries_id_seq'::regclass)"
not_null = true
[[public.entries.columns]]
name = "date"
type = "Date"
default = "CURRENT_TIMESTAMP"
not_null = true
[[public.entries.columns]]
name = "source_id"
type = "Integer"
not_null = true
reference = { table = "sources", identity = "id", label = "Source Id" }
[[public.entries.columns]]
name = "uid"
not_null = true
type = { Varchar = {} }
[[public.entries.columns]]
name = "text"
type = "Text"
not_null = false