b90ff252d1
Public archive with sidebar navigation, project pages, month archive, search and entry pages with image blocks. Admin area for brands, projects, post types, users, api clients, media and the entry editor with drag and drop images, preview per audience, scheduling and publish checks. Read and write API with bearer tokens, audience scoping, idempotent creation, OpenAPI document and editorial guide. Magic link login with configurable allowed domains, whole app behind the session gate. 456 tests including design rule checks.
1057 lines
25 KiB
JSON
1057 lines
25 KiB
JSON
{
|
|
"id": "5058fde9-f0f9-4300-b114-85c278913f85",
|
|
"prevId": "2acce0ea-fb01-4805-80fd-70adc031de0e",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.brand": {
|
|
"name": "brand",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'#191c20'"
|
|
},
|
|
"sort": {
|
|
"name": "sort",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"brand_slug_unique": {
|
|
"name": "brand_slug_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.project": {
|
|
"name": "project",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"brand_id": {
|
|
"name": "brand_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"code": {
|
|
"name": "code",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'#191c20'"
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"sort": {
|
|
"name": "sort",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"project_brand_id_brand_id_fk": {
|
|
"name": "project_brand_id_brand_id_fk",
|
|
"tableFrom": "project",
|
|
"tableTo": "brand",
|
|
"columnsFrom": [
|
|
"brand_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "restrict",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"project_slug_unique": {
|
|
"name": "project_slug_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.media": {
|
|
"name": "media",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "media_kind",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'image'"
|
|
},
|
|
"original_filename": {
|
|
"name": "original_filename",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"mime": {
|
|
"name": "mime",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"width": {
|
|
"name": "width",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"height": {
|
|
"name": "height",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"byte_size": {
|
|
"name": "byte_size",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"variants": {
|
|
"name": "variants",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[]'::jsonb"
|
|
},
|
|
"alt": {
|
|
"name": "alt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"caption": {
|
|
"name": "caption",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"media_project_id_project_id_fk": {
|
|
"name": "media_project_id_project_id_fk",
|
|
"tableFrom": "media",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.block": {
|
|
"name": "block",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"post_id": {
|
|
"name": "post_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sort": {
|
|
"name": "sort",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"data": {
|
|
"name": "data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'{}'::jsonb"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"block_post_sort": {
|
|
"name": "block_post_sort",
|
|
"columns": [
|
|
{
|
|
"expression": "post_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "sort",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"block_post_id_post_id_fk": {
|
|
"name": "block_post_id_post_id_fk",
|
|
"tableFrom": "block",
|
|
"tableTo": "post",
|
|
"columnsFrom": [
|
|
"post_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.issue": {
|
|
"name": "issue",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"period_from": {
|
|
"name": "period_from",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"period_to": {
|
|
"name": "period_to",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "issue_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'draft'"
|
|
},
|
|
"publish_at": {
|
|
"name": "publish_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"issue_project_id_project_id_fk": {
|
|
"name": "issue_project_id_project_id_fk",
|
|
"tableFrom": "issue",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.post_tag": {
|
|
"name": "post_tag",
|
|
"schema": "",
|
|
"columns": {
|
|
"post_id": {
|
|
"name": "post_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"tag_id": {
|
|
"name": "tag_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"post_tag_post_id_post_id_fk": {
|
|
"name": "post_tag_post_id_post_id_fk",
|
|
"tableFrom": "post_tag",
|
|
"tableTo": "post",
|
|
"columnsFrom": [
|
|
"post_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"post_tag_tag_id_tag_id_fk": {
|
|
"name": "post_tag_tag_id_tag_id_fk",
|
|
"tableFrom": "post_tag",
|
|
"tableTo": "tag",
|
|
"columnsFrom": [
|
|
"tag_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"post_tag_post_id_tag_id_pk": {
|
|
"name": "post_tag_post_id_tag_id_pk",
|
|
"columns": [
|
|
"post_id",
|
|
"tag_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.post": {
|
|
"name": "post",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"issue_id": {
|
|
"name": "issue_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"number": {
|
|
"name": "number",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"teaser": {
|
|
"name": "teaser",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "post_type",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'feature'"
|
|
},
|
|
"audience": {
|
|
"name": "audience",
|
|
"type": "post_audience",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'internal'"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "post_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'draft'"
|
|
},
|
|
"locale": {
|
|
"name": "locale",
|
|
"type": "post_locale",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'de'"
|
|
},
|
|
"translation_group": {
|
|
"name": "translation_group",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"publish_at": {
|
|
"name": "publish_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"author_name": {
|
|
"name": "author_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cover_media_id": {
|
|
"name": "cover_media_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"post_publish_at": {
|
|
"name": "post_publish_at",
|
|
"columns": [
|
|
{
|
|
"expression": "publish_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"post_project_status": {
|
|
"name": "post_project_status",
|
|
"columns": [
|
|
{
|
|
"expression": "project_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"post_project_id_project_id_fk": {
|
|
"name": "post_project_id_project_id_fk",
|
|
"tableFrom": "post",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"post_issue_id_issue_id_fk": {
|
|
"name": "post_issue_id_issue_id_fk",
|
|
"tableFrom": "post",
|
|
"tableTo": "issue",
|
|
"columnsFrom": [
|
|
"issue_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"post_cover_media_id_media_id_fk": {
|
|
"name": "post_cover_media_id_media_id_fk",
|
|
"tableFrom": "post",
|
|
"tableTo": "media",
|
|
"columnsFrom": [
|
|
"cover_media_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"post_project_slug": {
|
|
"name": "post_project_slug",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"project_id",
|
|
"slug"
|
|
]
|
|
},
|
|
"post_project_number": {
|
|
"name": "post_project_number",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"project_id",
|
|
"number"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.tag": {
|
|
"name": "tag",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"tag_project_id_project_id_fk": {
|
|
"name": "tag_project_id_project_id_fk",
|
|
"tableFrom": "tag",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"tag_project_slug": {
|
|
"name": "tag_project_slug",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"project_id",
|
|
"slug"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.api_client": {
|
|
"name": "api_client",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token_hash": {
|
|
"name": "token_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"mode": {
|
|
"name": "mode",
|
|
"type": "client_mode",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'read'"
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "client_scope",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'customer'"
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"can_publish": {
|
|
"name": "can_publish",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"revoked_at": {
|
|
"name": "revoked_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"api_client_project_id_project_id_fk": {
|
|
"name": "api_client_project_id_project_id_fk",
|
|
"tableFrom": "api_client",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"api_client_token_hash_unique": {
|
|
"name": "api_client_token_hash_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"token_hash"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.post_read": {
|
|
"name": "post_read",
|
|
"schema": "",
|
|
"columns": {
|
|
"post_id": {
|
|
"name": "post_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"project_id": {
|
|
"name": "project_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"external_user_id": {
|
|
"name": "external_user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"read_at": {
|
|
"name": "read_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"post_read_project_user": {
|
|
"name": "post_read_project_user",
|
|
"columns": [
|
|
{
|
|
"expression": "project_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "external_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"post_read_post_id_post_id_fk": {
|
|
"name": "post_read_post_id_post_id_fk",
|
|
"tableFrom": "post_read",
|
|
"tableTo": "post",
|
|
"columnsFrom": [
|
|
"post_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"post_read_project_id_project_id_fk": {
|
|
"name": "post_read_project_id_project_id_fk",
|
|
"tableFrom": "post_read",
|
|
"tableTo": "project",
|
|
"columnsFrom": [
|
|
"project_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"post_read_post_id_external_user_id_pk": {
|
|
"name": "post_read_post_id_external_user_id_pk",
|
|
"columns": [
|
|
"post_id",
|
|
"external_user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.media_kind": {
|
|
"name": "media_kind",
|
|
"schema": "public",
|
|
"values": [
|
|
"image",
|
|
"video"
|
|
]
|
|
},
|
|
"public.issue_status": {
|
|
"name": "issue_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"draft",
|
|
"scheduled",
|
|
"published"
|
|
]
|
|
},
|
|
"public.post_audience": {
|
|
"name": "post_audience",
|
|
"schema": "public",
|
|
"values": [
|
|
"internal",
|
|
"customer",
|
|
"public"
|
|
]
|
|
},
|
|
"public.post_locale": {
|
|
"name": "post_locale",
|
|
"schema": "public",
|
|
"values": [
|
|
"de",
|
|
"en"
|
|
]
|
|
},
|
|
"public.post_status": {
|
|
"name": "post_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"draft",
|
|
"review",
|
|
"scheduled",
|
|
"published",
|
|
"archived"
|
|
]
|
|
},
|
|
"public.post_type": {
|
|
"name": "post_type",
|
|
"schema": "public",
|
|
"values": [
|
|
"feature",
|
|
"improvement",
|
|
"fix",
|
|
"breaking",
|
|
"info"
|
|
]
|
|
},
|
|
"public.client_mode": {
|
|
"name": "client_mode",
|
|
"schema": "public",
|
|
"values": [
|
|
"read",
|
|
"write"
|
|
]
|
|
},
|
|
"public.client_scope": {
|
|
"name": "client_scope",
|
|
"schema": "public",
|
|
"values": [
|
|
"internal",
|
|
"customer",
|
|
"public"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |