5976 lines
No EOL
160 KiB
JSON
5976 lines
No EOL
160 KiB
JSON
{
|
|
"id": "84b6a845-28ae-460e-b421-4b1924c2b3b0",
|
|
"prevId": "88ecc6bc-b77d-4fe6-b845-eb3605dcbbe1",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.workspace_invites": {
|
|
"name": "workspace_invites",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"invited_by_user_id": {
|
|
"name": "invited_by_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "varchar(128)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now() + interval '14 days'"
|
|
},
|
|
"accepted_at": {
|
|
"name": "accepted_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": {
|
|
"workspace_invites_workspace_id_idx": {
|
|
"name": "workspace_invites_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"workspace_invites_token_unique": {
|
|
"name": "workspace_invites_token_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "token",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"workspace_invites_open_email_unique": {
|
|
"name": "workspace_invites_open_email_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": "\"workspace_invites\".\"accepted_at\" IS NULL AND \"workspace_invites\".\"revoked_at\" IS NULL",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"workspace_invites_workspace_id_workspaces_id_fk": {
|
|
"name": "workspace_invites_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "workspace_invites",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"workspace_invites_invited_by_user_id_users_id_fk": {
|
|
"name": "workspace_invites_invited_by_user_id_users_id_fk",
|
|
"tableFrom": "workspace_invites",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"invited_by_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.workspaces": {
|
|
"name": "workspaces",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(60)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"owner_user_id": {
|
|
"name": "owner_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"plan_tier": {
|
|
"name": "plan_tier",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'free'"
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_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()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"workspaces_slug_unique": {
|
|
"name": "workspaces_slug_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "slug",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"workspaces_owner_user_id_idx": {
|
|
"name": "workspaces_owner_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "owner_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"workspaces_owner_user_id_users_id_fk": {
|
|
"name": "workspaces_owner_user_id_users_id_fk",
|
|
"tableFrom": "workspaces",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"owner_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.object_assignees": {
|
|
"name": "object_assignees",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"object_id": {
|
|
"name": "object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'assignee'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"object_assignees_object_id_user_id_unique": {
|
|
"name": "object_assignees_object_id_user_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_assignees_object_id_idx": {
|
|
"name": "object_assignees_object_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_assignees_user_id_idx": {
|
|
"name": "object_assignees_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"object_assignees_object_id_objects_id_fk": {
|
|
"name": "object_assignees_object_id_objects_id_fk",
|
|
"tableFrom": "object_assignees",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"object_assignees_user_id_users_id_fk": {
|
|
"name": "object_assignees_user_id_users_id_fk",
|
|
"tableFrom": "object_assignees",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.objects": {
|
|
"name": "objects",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_id": {
|
|
"name": "parent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "''"
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cover_image": {
|
|
"name": "cover_image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"template_id": {
|
|
"name": "template_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"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()"
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"objects_parent_id_idx": {
|
|
"name": "objects_parent_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "parent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"objects_type_idx": {
|
|
"name": "objects_type_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"objects_workspace_id_idx": {
|
|
"name": "objects_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"objects_template_id_idx": {
|
|
"name": "objects_template_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "template_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"objects_created_by_idx": {
|
|
"name": "objects_created_by_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_by",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"objects_type_workspace_id_idx": {
|
|
"name": "objects_type_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"objects_workspace_id_workspaces_id_fk": {
|
|
"name": "objects_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "objects",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"objects_created_by_users_id_fk": {
|
|
"name": "objects_created_by_users_id_fk",
|
|
"tableFrom": "objects",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"objects_parent_id_objects_id_fk": {
|
|
"name": "objects_parent_id_objects_id_fk",
|
|
"tableFrom": "objects",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"parent_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"objects_template_id_templates_id_fk": {
|
|
"name": "objects_template_id_templates_id_fk",
|
|
"tableFrom": "objects",
|
|
"tableTo": "templates",
|
|
"columnsFrom": [
|
|
"template_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.workspace_members": {
|
|
"name": "workspace_members",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'member'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"workspace_members_workspace_id_user_id_unique": {
|
|
"name": "workspace_members_workspace_id_user_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"workspace_members_workspace_id_idx": {
|
|
"name": "workspace_members_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"workspace_members_user_id_idx": {
|
|
"name": "workspace_members_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"workspace_members_workspace_id_workspaces_id_fk": {
|
|
"name": "workspace_members_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "workspace_members",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"workspace_members_user_id_users_id_fk": {
|
|
"name": "workspace_members_user_id_users_id_fk",
|
|
"tableFrom": "workspace_members",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.object_type_defs": {
|
|
"name": "object_type_defs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"layout": {
|
|
"name": "layout",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'task'"
|
|
},
|
|
"default_properties": {
|
|
"name": "default_properties",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"object_type_defs_workspace_id_idx": {
|
|
"name": "object_type_defs_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_type_defs_slug_idx": {
|
|
"name": "object_type_defs_slug_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "slug",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"object_type_defs_workspace_id_workspaces_id_fk": {
|
|
"name": "object_type_defs_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "object_type_defs",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.property_definitions": {
|
|
"name": "property_definitions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"field_type": {
|
|
"name": "field_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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": {
|
|
"property_definitions_workspace_id_idx": {
|
|
"name": "property_definitions_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"property_definitions_workspace_id_name_idx": {
|
|
"name": "property_definitions_workspace_id_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"property_definitions_workspace_id_workspaces_id_fk": {
|
|
"name": "property_definitions_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "property_definitions",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.property_values": {
|
|
"name": "property_values",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"object_id": {
|
|
"name": "object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"property_def_id": {
|
|
"name": "property_def_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"property_values_object_id_property_def_id_unique": {
|
|
"name": "property_values_object_id_property_def_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "property_def_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"property_values_object_id_idx": {
|
|
"name": "property_values_object_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"property_values_property_def_id_idx": {
|
|
"name": "property_values_property_def_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "property_def_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"property_values_object_id_objects_id_fk": {
|
|
"name": "property_values_object_id_objects_id_fk",
|
|
"tableFrom": "property_values",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"property_values_property_def_id_property_definitions_id_fk": {
|
|
"name": "property_values_property_def_id_property_definitions_id_fk",
|
|
"tableFrom": "property_values",
|
|
"tableTo": "property_definitions",
|
|
"columnsFrom": [
|
|
"property_def_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.views": {
|
|
"name": "views",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"object_id": {
|
|
"name": "object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"view_type": {
|
|
"name": "view_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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": {
|
|
"views_object_id_idx": {
|
|
"name": "views_object_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"views_object_id_objects_id_fk": {
|
|
"name": "views_object_id_objects_id_fk",
|
|
"tableFrom": "views",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.accounts": {
|
|
"name": "accounts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_account_id": {
|
|
"name": "provider_account_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"refresh_token": {
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"access_token": {
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"token_type": {
|
|
"name": "token_type",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id_token": {
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"session_state": {
|
|
"name": "session_state",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"accounts_provider_provider_account_id_unique": {
|
|
"name": "accounts_provider_provider_account_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "provider",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "provider_account_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"accounts_user_id_idx": {
|
|
"name": "accounts_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"accounts_user_id_users_id_fk": {
|
|
"name": "accounts_user_id_users_id_fk",
|
|
"tableFrom": "accounts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sessions": {
|
|
"name": "sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"session_token": {
|
|
"name": "session_token",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {
|
|
"sessions_user_id_idx": {
|
|
"name": "sessions_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"sessions_session_token_unique": {
|
|
"name": "sessions_session_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"session_token"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_email_identities": {
|
|
"name": "user_email_identities",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"verified_at": {
|
|
"name": "verified_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "varchar(30)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_email_identities_user_id_idx": {
|
|
"name": "user_email_identities_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_email_identities_email_idx": {
|
|
"name": "user_email_identities_email_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_email_identities_user_id_email_unique": {
|
|
"name": "user_email_identities_user_id_email_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"user_email_identities_verified_email_unique": {
|
|
"name": "user_email_identities_verified_email_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": "\"user_email_identities\".\"verified_at\" IS NOT NULL",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_email_identities_user_id_users_id_fk": {
|
|
"name": "user_email_identities_user_id_users_id_fk",
|
|
"tableFrom": "user_email_identities",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.users": {
|
|
"name": "users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"avatar_url": {
|
|
"name": "avatar_url",
|
|
"type": "text",
|
|
"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": {
|
|
"users_email_idx": {
|
|
"name": "users_email_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"users_email_lower_unique": {
|
|
"name": "users_email_lower_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "lower(\"email\")",
|
|
"asc": true,
|
|
"isExpression": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"users_email_unique": {
|
|
"name": "users_email_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.verification_tokens": {
|
|
"name": "verification_tokens",
|
|
"schema": "",
|
|
"columns": {
|
|
"identifier": {
|
|
"name": "identifier",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"verification_tokens_identifier_token_pk": {
|
|
"name": "verification_tokens_identifier_token_pk",
|
|
"columns": [
|
|
"identifier",
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.object_relations": {
|
|
"name": "object_relations",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"source_id": {
|
|
"name": "source_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_id": {
|
|
"name": "target_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"relation_type": {
|
|
"name": "relation_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"object_relations_source_id_idx": {
|
|
"name": "object_relations_source_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "source_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_relations_target_id_idx": {
|
|
"name": "object_relations_target_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "target_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_relations_relation_type_idx": {
|
|
"name": "object_relations_relation_type_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "relation_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"object_relations_source_target_type_unique": {
|
|
"name": "object_relations_source_target_type_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "source_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "target_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "relation_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"object_relations_source_id_objects_id_fk": {
|
|
"name": "object_relations_source_id_objects_id_fk",
|
|
"tableFrom": "object_relations",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"source_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"object_relations_target_id_objects_id_fk": {
|
|
"name": "object_relations_target_id_objects_id_fk",
|
|
"tableFrom": "object_relations",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"target_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.templates": {
|
|
"name": "templates",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_type": {
|
|
"name": "target_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"schema": {
|
|
"name": "schema",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"templates_workspace_id_idx": {
|
|
"name": "templates_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"templates_workspace_id_workspaces_id_fk": {
|
|
"name": "templates_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "templates",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.form_responses": {
|
|
"name": "form_responses",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"form_id": {
|
|
"name": "form_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"respondent_id": {
|
|
"name": "respondent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_object_id": {
|
|
"name": "created_object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"data": {
|
|
"name": "data",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'{}'"
|
|
},
|
|
"submitted_at": {
|
|
"name": "submitted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"form_responses_form_id_idx": {
|
|
"name": "form_responses_form_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "form_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"form_responses_respondent_id_idx": {
|
|
"name": "form_responses_respondent_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "respondent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"form_responses_form_id_forms_id_fk": {
|
|
"name": "form_responses_form_id_forms_id_fk",
|
|
"tableFrom": "form_responses",
|
|
"tableTo": "forms",
|
|
"columnsFrom": [
|
|
"form_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"form_responses_respondent_id_users_id_fk": {
|
|
"name": "form_responses_respondent_id_users_id_fk",
|
|
"tableFrom": "form_responses",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"respondent_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"form_responses_created_object_id_objects_id_fk": {
|
|
"name": "form_responses_created_object_id_objects_id_fk",
|
|
"tableFrom": "form_responses",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"created_object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.forms": {
|
|
"name": "forms",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cover_image": {
|
|
"name": "cover_image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"object_id": {
|
|
"name": "object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"target_type": {
|
|
"name": "target_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'task'"
|
|
},
|
|
"fields": {
|
|
"name": "fields",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[]'"
|
|
},
|
|
"settings": {
|
|
"name": "settings",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'{}'"
|
|
},
|
|
"is_published": {
|
|
"name": "is_published",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"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": {
|
|
"forms_workspace_id_idx": {
|
|
"name": "forms_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"forms_object_id_idx": {
|
|
"name": "forms_object_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"forms_workspace_id_workspaces_id_fk": {
|
|
"name": "forms_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "forms",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"forms_object_id_objects_id_fk": {
|
|
"name": "forms_object_id_objects_id_fk",
|
|
"tableFrom": "forms",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"forms_created_by_users_id_fk": {
|
|
"name": "forms_created_by_users_id_fk",
|
|
"tableFrom": "forms",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_favorites": {
|
|
"name": "user_favorites",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"object_id": {
|
|
"name": "object_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_favorites_user_object_idx": {
|
|
"name": "user_favorites_user_object_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "object_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_favorites_user_id_users_id_fk": {
|
|
"name": "user_favorites_user_id_users_id_fk",
|
|
"tableFrom": "user_favorites",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_favorites_object_id_objects_id_fk": {
|
|
"name": "user_favorites_object_id_objects_id_fk",
|
|
"tableFrom": "user_favorites",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"object_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.markdown_backlog_items": {
|
|
"name": "markdown_backlog_items",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slug": {
|
|
"name": "slug",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"plan_slug": {
|
|
"name": "plan_slug",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"epic_slug": {
|
|
"name": "epic_slug",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"parent_id": {
|
|
"name": "parent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"repo_path": {
|
|
"name": "repo_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "''"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"priority": {
|
|
"name": "priority",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"owner": {
|
|
"name": "owner",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"frontmatter": {
|
|
"name": "frontmatter",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body_markdown": {
|
|
"name": "body_markdown",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "''"
|
|
},
|
|
"content_hash": {
|
|
"name": "content_hash",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"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()"
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"workflow_prompt": {
|
|
"name": "workflow_prompt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"markdown_backlog_workspace_repo_path_unique": {
|
|
"name": "markdown_backlog_workspace_repo_path_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "repo_path",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"markdown_backlog_workspace_plan_idx": {
|
|
"name": "markdown_backlog_workspace_plan_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "plan_slug",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"markdown_backlog_parent_id_idx": {
|
|
"name": "markdown_backlog_parent_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "parent_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"markdown_backlog_workspace_kind_idx": {
|
|
"name": "markdown_backlog_workspace_kind_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "kind",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"markdown_backlog_items_workspace_id_workspaces_id_fk": {
|
|
"name": "markdown_backlog_items_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "markdown_backlog_items",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"markdown_backlog_items_parent_id_markdown_backlog_items_id_fk": {
|
|
"name": "markdown_backlog_items_parent_id_markdown_backlog_items_id_fk",
|
|
"tableFrom": "markdown_backlog_items",
|
|
"tableTo": "markdown_backlog_items",
|
|
"columnsFrom": [
|
|
"parent_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.cursor_sync_mappings": {
|
|
"name": "cursor_sync_mappings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"backlog_item_id": {
|
|
"name": "backlog_item_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"cursor_plan_id": {
|
|
"name": "cursor_plan_id",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cursor_item_id": {
|
|
"name": "cursor_item_id",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_pulled_at": {
|
|
"name": "last_pulled_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_pushed_at": {
|
|
"name": "last_pushed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sync_content_hash": {
|
|
"name": "sync_content_hash",
|
|
"type": "varchar(64)",
|
|
"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": {
|
|
"cursor_sync_mappings_backlog_item_id_unique": {
|
|
"name": "cursor_sync_mappings_backlog_item_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "backlog_item_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"cursor_sync_mappings_workspace_id_idx": {
|
|
"name": "cursor_sync_mappings_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"cursor_sync_mappings_workspace_id_workspaces_id_fk": {
|
|
"name": "cursor_sync_mappings_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "cursor_sync_mappings",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"cursor_sync_mappings_backlog_item_id_markdown_backlog_items_id_fk": {
|
|
"name": "cursor_sync_mappings_backlog_item_id_markdown_backlog_items_id_fk",
|
|
"tableFrom": "cursor_sync_mappings",
|
|
"tableTo": "markdown_backlog_items",
|
|
"columnsFrom": [
|
|
"backlog_item_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.audit_log": {
|
|
"name": "audit_log",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"actor_user_id": {
|
|
"name": "actor_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"action": {
|
|
"name": "action",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_type": {
|
|
"name": "target_type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_id": {
|
|
"name": "target_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"audit_log_workspace_id_created_at_idx": {
|
|
"name": "audit_log_workspace_id_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"audit_log_actor_user_id_idx": {
|
|
"name": "audit_log_actor_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "actor_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"audit_log_action_idx": {
|
|
"name": "audit_log_action_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "action",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"audit_log_workspace_id_workspaces_id_fk": {
|
|
"name": "audit_log_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "audit_log",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"audit_log_actor_user_id_users_id_fk": {
|
|
"name": "audit_log_actor_user_id_users_id_fk",
|
|
"tableFrom": "audit_log",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"actor_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.agent_runs": {
|
|
"name": "agent_runs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"backlog_item_id": {
|
|
"name": "backlog_item_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"actor_user_id": {
|
|
"name": "actor_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"finished_at": {
|
|
"name": "finished_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"outcome": {
|
|
"name": "outcome",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"error": {
|
|
"name": "error",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tokens_input": {
|
|
"name": "tokens_input",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tokens_output": {
|
|
"name": "tokens_output",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tokens_total": {
|
|
"name": "tokens_total",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_alias": {
|
|
"name": "model_alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"provider_type": {
|
|
"name": "provider_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_id": {
|
|
"name": "model_id",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_tier": {
|
|
"name": "model_tier",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"harness_alias": {
|
|
"name": "harness_alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"agent_runs_workspace_id_started_at_idx": {
|
|
"name": "agent_runs_workspace_id_started_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "started_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"agent_runs_backlog_item_id_started_at_idx": {
|
|
"name": "agent_runs_backlog_item_id_started_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "backlog_item_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "started_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"agent_runs_workspace_id_workspaces_id_fk": {
|
|
"name": "agent_runs_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "agent_runs",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"agent_runs_backlog_item_id_markdown_backlog_items_id_fk": {
|
|
"name": "agent_runs_backlog_item_id_markdown_backlog_items_id_fk",
|
|
"tableFrom": "agent_runs",
|
|
"tableTo": "markdown_backlog_items",
|
|
"columnsFrom": [
|
|
"backlog_item_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"agent_runs_actor_user_id_users_id_fk": {
|
|
"name": "agent_runs_actor_user_id_users_id_fk",
|
|
"tableFrom": "agent_runs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"actor_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.model_providers": {
|
|
"name": "model_providers",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"alias": {
|
|
"name": "alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_type": {
|
|
"name": "provider_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"model_id": {
|
|
"name": "model_id",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"base_url": {
|
|
"name": "base_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"api_key_env_var": {
|
|
"name": "api_key_env_var",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"extra_headers": {
|
|
"name": "extra_headers",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"default_params": {
|
|
"name": "default_params",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"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": {
|
|
"model_providers_workspace_id_idx": {
|
|
"name": "model_providers_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"model_providers_workspace_id_alias_unique": {
|
|
"name": "model_providers_workspace_id_alias_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "alias",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"model_providers_workspace_id_workspaces_id_fk": {
|
|
"name": "model_providers_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "model_providers",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.role_model_routes": {
|
|
"name": "role_model_routes",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_alias_id": {
|
|
"name": "provider_alias_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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": {
|
|
"role_model_routes_workspace_id_idx": {
|
|
"name": "role_model_routes_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"role_model_routes_workspace_id_role_id_unique": {
|
|
"name": "role_model_routes_workspace_id_role_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "role_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"role_model_routes_provider_alias_id_idx": {
|
|
"name": "role_model_routes_provider_alias_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "provider_alias_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"role_model_routes_workspace_id_workspaces_id_fk": {
|
|
"name": "role_model_routes_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "role_model_routes",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"role_model_routes_provider_alias_id_model_providers_id_fk": {
|
|
"name": "role_model_routes_provider_alias_id_model_providers_id_fk",
|
|
"tableFrom": "role_model_routes",
|
|
"tableTo": "model_providers",
|
|
"columnsFrom": [
|
|
"provider_alias_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.connected_repos": {
|
|
"name": "connected_repos",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"git_remote_url": {
|
|
"name": "git_remote_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"forge_type": {
|
|
"name": "forge_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"api_base_url": {
|
|
"name": "api_base_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"owner": {
|
|
"name": "owner",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"repo_name": {
|
|
"name": "repo_name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"default_branch": {
|
|
"name": "default_branch",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"token_env_var": {
|
|
"name": "token_env_var",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"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": {
|
|
"connected_repos_workspace_id_idx": {
|
|
"name": "connected_repos_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"connected_repos_workspace_repo_unique": {
|
|
"name": "connected_repos_workspace_repo_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "api_base_url",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "owner",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "repo_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"connected_repos_workspace_id_workspaces_id_fk": {
|
|
"name": "connected_repos_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "connected_repos",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.convoy_events": {
|
|
"name": "convoy_events",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"convoy_id": {
|
|
"name": "convoy_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brief_id": {
|
|
"name": "brief_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"actor": {
|
|
"name": "actor",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"event_type": {
|
|
"name": "event_type",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"classification": {
|
|
"name": "classification",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"skip_flags": {
|
|
"name": "skip_flags",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"duration_s": {
|
|
"name": "duration_s",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"outcome": {
|
|
"name": "outcome",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"repo": {
|
|
"name": "repo",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"multitask_group": {
|
|
"name": "multitask_group",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_alias": {
|
|
"name": "model_alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"provider_type": {
|
|
"name": "provider_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_id": {
|
|
"name": "model_id",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"model_tier": {
|
|
"name": "model_tier",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"harness_alias": {
|
|
"name": "harness_alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"estimated_cost_usd": {
|
|
"name": "estimated_cost_usd",
|
|
"type": "numeric(12, 6)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"occurred_at": {
|
|
"name": "occurred_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"convoy_events_workspace_id_occurred_at_idx": {
|
|
"name": "convoy_events_workspace_id_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"convoy_events_convoy_id_occurred_at_idx": {
|
|
"name": "convoy_events_convoy_id_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "convoy_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"convoy_events_workspace_id_workspaces_id_fk": {
|
|
"name": "convoy_events_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "convoy_events",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_events_convoy_id_objects_id_fk": {
|
|
"name": "convoy_events_convoy_id_objects_id_fk",
|
|
"tableFrom": "convoy_events",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"convoy_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_events_brief_id_objects_id_fk": {
|
|
"name": "convoy_events_brief_id_objects_id_fk",
|
|
"tableFrom": "convoy_events",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"brief_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.worker_checkpoints": {
|
|
"name": "worker_checkpoints",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"agent_run_id": {
|
|
"name": "agent_run_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"convoy_id": {
|
|
"name": "convoy_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brief_id": {
|
|
"name": "brief_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"checkpoint_seq": {
|
|
"name": "checkpoint_seq",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"tool_history": {
|
|
"name": "tool_history",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"files_touched": {
|
|
"name": "files_touched",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"branch": {
|
|
"name": "branch",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"worktree_path": {
|
|
"name": "worktree_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"occurred_at": {
|
|
"name": "occurred_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"worker_checkpoints_workspace_id_occurred_at_idx": {
|
|
"name": "worker_checkpoints_workspace_id_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"worker_checkpoints_agent_run_id_seq_idx": {
|
|
"name": "worker_checkpoints_agent_run_id_seq_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "agent_run_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "checkpoint_seq",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"worker_checkpoints_convoy_id_occurred_at_idx": {
|
|
"name": "worker_checkpoints_convoy_id_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "convoy_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"worker_checkpoints_workspace_id_workspaces_id_fk": {
|
|
"name": "worker_checkpoints_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "worker_checkpoints",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"worker_checkpoints_agent_run_id_agent_runs_id_fk": {
|
|
"name": "worker_checkpoints_agent_run_id_agent_runs_id_fk",
|
|
"tableFrom": "worker_checkpoints",
|
|
"tableTo": "agent_runs",
|
|
"columnsFrom": [
|
|
"agent_run_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"worker_checkpoints_convoy_id_objects_id_fk": {
|
|
"name": "worker_checkpoints_convoy_id_objects_id_fk",
|
|
"tableFrom": "worker_checkpoints",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"convoy_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"worker_checkpoints_brief_id_objects_id_fk": {
|
|
"name": "worker_checkpoints_brief_id_objects_id_fk",
|
|
"tableFrom": "worker_checkpoints",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"brief_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.harness_providers": {
|
|
"name": "harness_providers",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"alias": {
|
|
"name": "alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"harness_type": {
|
|
"name": "harness_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"endpoint_url": {
|
|
"name": "endpoint_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"auth_env_var": {
|
|
"name": "auth_env_var",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"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": {
|
|
"harness_providers_workspace_id_idx": {
|
|
"name": "harness_providers_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"harness_providers_workspace_id_alias_unique": {
|
|
"name": "harness_providers_workspace_id_alias_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "alias",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"harness_providers_workspace_id_workspaces_id_fk": {
|
|
"name": "harness_providers_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "harness_providers",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.role_harness_routes": {
|
|
"name": "role_harness_routes",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"harness_provider_id": {
|
|
"name": "harness_provider_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"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": {
|
|
"role_harness_routes_workspace_id_idx": {
|
|
"name": "role_harness_routes_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"role_harness_routes_workspace_id_role_id_unique": {
|
|
"name": "role_harness_routes_workspace_id_role_id_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "role_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"role_harness_routes_harness_provider_id_idx": {
|
|
"name": "role_harness_routes_harness_provider_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "harness_provider_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"role_harness_routes_workspace_id_workspaces_id_fk": {
|
|
"name": "role_harness_routes_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "role_harness_routes",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"role_harness_routes_harness_provider_id_harness_providers_id_fk": {
|
|
"name": "role_harness_routes_harness_provider_id_harness_providers_id_fk",
|
|
"tableFrom": "role_harness_routes",
|
|
"tableTo": "harness_providers",
|
|
"columnsFrom": [
|
|
"harness_provider_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.convoy_operator_messages": {
|
|
"name": "convoy_operator_messages",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"convoy_id": {
|
|
"name": "convoy_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"brief_id": {
|
|
"name": "brief_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"agent_run_id": {
|
|
"name": "agent_run_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"delivery": {
|
|
"name": "delivery",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"body": {
|
|
"name": "body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"author_user_id": {
|
|
"name": "author_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"delivered_at": {
|
|
"name": "delivered_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": {
|
|
"convoy_operator_messages_workspace_id_convoy_id_delivered_at_idx": {
|
|
"name": "convoy_operator_messages_workspace_id_convoy_id_delivered_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "convoy_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "delivered_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"convoy_operator_messages_workspace_id_workspaces_id_fk": {
|
|
"name": "convoy_operator_messages_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "convoy_operator_messages",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_operator_messages_convoy_id_objects_id_fk": {
|
|
"name": "convoy_operator_messages_convoy_id_objects_id_fk",
|
|
"tableFrom": "convoy_operator_messages",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"convoy_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_operator_messages_brief_id_objects_id_fk": {
|
|
"name": "convoy_operator_messages_brief_id_objects_id_fk",
|
|
"tableFrom": "convoy_operator_messages",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"brief_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_operator_messages_agent_run_id_agent_runs_id_fk": {
|
|
"name": "convoy_operator_messages_agent_run_id_agent_runs_id_fk",
|
|
"tableFrom": "convoy_operator_messages",
|
|
"tableTo": "agent_runs",
|
|
"columnsFrom": [
|
|
"agent_run_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"convoy_operator_messages_author_user_id_users_id_fk": {
|
|
"name": "convoy_operator_messages_author_user_id_users_id_fk",
|
|
"tableFrom": "convoy_operator_messages",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"author_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.completion_artifacts": {
|
|
"name": "completion_artifacts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"convoy_id": {
|
|
"name": "convoy_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"summary_md": {
|
|
"name": "summary_md",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"screenshot_url": {
|
|
"name": "screenshot_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"completion_artifacts_workspace_id_idx": {
|
|
"name": "completion_artifacts_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"completion_artifacts_convoy_id_idx": {
|
|
"name": "completion_artifacts_convoy_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "convoy_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"completion_artifacts_created_at_idx": {
|
|
"name": "completion_artifacts_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"completion_artifacts_workspace_id_workspaces_id_fk": {
|
|
"name": "completion_artifacts_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "completion_artifacts",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"completion_artifacts_convoy_id_objects_id_fk": {
|
|
"name": "completion_artifacts_convoy_id_objects_id_fk",
|
|
"tableFrom": "completion_artifacts",
|
|
"tableTo": "objects",
|
|
"columnsFrom": [
|
|
"convoy_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"completion_artifacts_created_by_users_id_fk": {
|
|
"name": "completion_artifacts_created_by_users_id_fk",
|
|
"tableFrom": "completion_artifacts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.budget_caps": {
|
|
"name": "budget_caps",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"cap_usd": {
|
|
"name": "cap_usd",
|
|
"type": "numeric(12, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"period": {
|
|
"name": "period",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'monthly'"
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"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": {
|
|
"budget_caps_workspace_id_idx": {
|
|
"name": "budget_caps_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"budget_caps_workspace_id_period_unique": {
|
|
"name": "budget_caps_workspace_id_period_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "period",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"budget_caps_workspace_id_workspaces_id_fk": {
|
|
"name": "budget_caps_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "budget_caps",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.spend_ledger": {
|
|
"name": "spend_ledger",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"model_alias": {
|
|
"name": "model_alias",
|
|
"type": "varchar(120)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_type": {
|
|
"name": "provider_type",
|
|
"type": "varchar(40)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"model_tier": {
|
|
"name": "model_tier",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"estimated_cost_usd": {
|
|
"name": "estimated_cost_usd",
|
|
"type": "numeric(12, 6)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"occurred_at": {
|
|
"name": "occurred_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"spend_ledger_workspace_id_occurred_at_idx": {
|
|
"name": "spend_ledger_workspace_id_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"spend_ledger_model_alias_occurred_at_idx": {
|
|
"name": "spend_ledger_model_alias_occurred_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "model_alias",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "occurred_at",
|
|
"isExpression": false,
|
|
"asc": false,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"spend_ledger_workspace_id_workspaces_id_fk": {
|
|
"name": "spend_ledger_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "spend_ledger",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_channel_members": {
|
|
"name": "chat_channel_members",
|
|
"schema": "",
|
|
"columns": {
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"joined_at": {
|
|
"name": "joined_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_channel_members_workspace_id_idx": {
|
|
"name": "chat_channel_members_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"chat_channel_members_workspace_id_user_id_idx": {
|
|
"name": "chat_channel_members_workspace_id_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_channel_members_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_channel_members_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_channel_members",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_channel_members_channel_fk": {
|
|
"name": "chat_channel_members_channel_fk",
|
|
"tableFrom": "chat_channel_members",
|
|
"tableTo": "chat_channels",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_channel_members_workspace_member_fk": {
|
|
"name": "chat_channel_members_workspace_member_fk",
|
|
"tableFrom": "chat_channel_members",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"chat_channel_members_workspace_id_channel_id_user_id_pk": {
|
|
"name": "chat_channel_members_workspace_id_channel_id_user_id_pk",
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_channels": {
|
|
"name": "chat_channels",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "varchar(16)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"owner_user_id": {
|
|
"name": "owner_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"direct_key": {
|
|
"name": "direct_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"next_sequence": {
|
|
"name": "next_sequence",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "1"
|
|
},
|
|
"next_mutation_sequence": {
|
|
"name": "next_mutation_sequence",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "1"
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_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()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_channels_workspace_id_idx": {
|
|
"name": "chat_channels_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"chat_channels_workspace_id_direct_key_unique": {
|
|
"name": "chat_channels_workspace_id_direct_key_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "direct_key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"where": "\"chat_channels\".\"direct_key\" is not null",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_channels_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_channels_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_channels",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_channels_owner_member_fk": {
|
|
"name": "chat_channels_owner_member_fk",
|
|
"tableFrom": "chat_channels",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"owner_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"chat_channels_workspace_id_id_unique": {
|
|
"name": "chat_channels_workspace_id_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {
|
|
"chat_channels_kind_check": {
|
|
"name": "chat_channels_kind_check",
|
|
"value": "\"chat_channels\".\"kind\" in ('public', 'private', 'direct')"
|
|
},
|
|
"chat_channels_direct_key_check": {
|
|
"name": "chat_channels_direct_key_check",
|
|
"value": "(\"chat_channels\".\"kind\" = 'direct' and \"chat_channels\".\"direct_key\" is not null and \"chat_channels\".\"name\" is null) or (\"chat_channels\".\"kind\" <> 'direct' and \"chat_channels\".\"direct_key\" is null)"
|
|
},
|
|
"chat_channels_next_sequence_check": {
|
|
"name": "chat_channels_next_sequence_check",
|
|
"value": "\"chat_channels\".\"next_sequence\" > 0"
|
|
}
|
|
},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_message_mentions": {
|
|
"name": "chat_message_mentions",
|
|
"schema": "",
|
|
"columns": {
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"message_id": {
|
|
"name": "message_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_message_mentions_workspace_id_idx": {
|
|
"name": "chat_message_mentions_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_message_mentions_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_message_mentions_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_message_mentions",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_message_mentions_message_fk": {
|
|
"name": "chat_message_mentions_message_fk",
|
|
"tableFrom": "chat_message_mentions",
|
|
"tableTo": "chat_messages",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"message_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_message_mentions_workspace_member_fk": {
|
|
"name": "chat_message_mentions_workspace_member_fk",
|
|
"tableFrom": "chat_message_mentions",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"chat_message_mentions_workspace_id_message_id_user_id_pk": {
|
|
"name": "chat_message_mentions_workspace_id_message_id_user_id_pk",
|
|
"columns": [
|
|
"workspace_id",
|
|
"message_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_message_mutations": {
|
|
"name": "chat_message_mutations",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"message_id": {
|
|
"name": "message_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"mutation_sequence": {
|
|
"name": "mutation_sequence",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"revision": {
|
|
"name": "revision",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "varchar(16)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_message_mutations_workspace_id_idx": {
|
|
"name": "chat_message_mutations_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_message_mutations_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_message_mutations_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_message_mutations",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_message_mutations_channel_fk": {
|
|
"name": "chat_message_mutations_channel_fk",
|
|
"tableFrom": "chat_message_mutations",
|
|
"tableTo": "chat_channels",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_message_mutations_message_fk": {
|
|
"name": "chat_message_mutations_message_fk",
|
|
"tableFrom": "chat_message_mutations",
|
|
"tableTo": "chat_messages",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"message_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"chat_message_mutations_channel_sequence_unique": {
|
|
"name": "chat_message_mutations_channel_sequence_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"mutation_sequence"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {
|
|
"chat_message_mutations_revision_check": {
|
|
"name": "chat_message_mutations_revision_check",
|
|
"value": "\"chat_message_mutations\".\"revision\" > 1"
|
|
}
|
|
},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_messages": {
|
|
"name": "chat_messages",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sequence": {
|
|
"name": "sequence",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"parent_message_id": {
|
|
"name": "parent_message_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"author_type": {
|
|
"name": "author_type",
|
|
"type": "varchar(16)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"author_user_id": {
|
|
"name": "author_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"author_agent_id": {
|
|
"name": "author_agent_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"body": {
|
|
"name": "body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"send_intent_fingerprint": {
|
|
"name": "send_intent_fingerprint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"revision": {
|
|
"name": "revision",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'sent'"
|
|
},
|
|
"client_idempotency_key": {
|
|
"name": "client_idempotency_key",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"edited_at": {
|
|
"name": "edited_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_messages_workspace_id_idx": {
|
|
"name": "chat_messages_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_messages_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_messages_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_messages",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_messages_channel_fk": {
|
|
"name": "chat_messages_channel_fk",
|
|
"tableFrom": "chat_messages",
|
|
"tableTo": "chat_channels",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_messages_parent_fk": {
|
|
"name": "chat_messages_parent_fk",
|
|
"tableFrom": "chat_messages",
|
|
"tableTo": "chat_messages",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"parent_message_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_messages_human_author_member_fk": {
|
|
"name": "chat_messages_human_author_member_fk",
|
|
"tableFrom": "chat_messages",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"author_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"chat_messages_workspace_id_id_unique": {
|
|
"name": "chat_messages_workspace_id_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"id"
|
|
]
|
|
},
|
|
"chat_messages_workspace_channel_id_unique": {
|
|
"name": "chat_messages_workspace_channel_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"id"
|
|
]
|
|
},
|
|
"chat_messages_workspace_channel_sequence_unique": {
|
|
"name": "chat_messages_workspace_channel_sequence_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"sequence"
|
|
]
|
|
},
|
|
"chat_messages_workspace_channel_client_key_unique": {
|
|
"name": "chat_messages_workspace_channel_client_key_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"client_idempotency_key"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {
|
|
"chat_messages_revision_check": {
|
|
"name": "chat_messages_revision_check",
|
|
"value": "\"chat_messages\".\"revision\" > 0"
|
|
},
|
|
"chat_messages_author_check": {
|
|
"name": "chat_messages_author_check",
|
|
"value": "(\"chat_messages\".\"author_type\" = 'human' and \"chat_messages\".\"author_user_id\" is not null and \"chat_messages\".\"author_agent_id\" is null) or (\"chat_messages\".\"author_type\" = 'agent' and \"chat_messages\".\"author_user_id\" is null and \"chat_messages\".\"author_agent_id\" is not null) or (\"chat_messages\".\"author_type\" = 'system' and \"chat_messages\".\"author_user_id\" is null and \"chat_messages\".\"author_agent_id\" is null)"
|
|
},
|
|
"chat_messages_status_check": {
|
|
"name": "chat_messages_status_check",
|
|
"value": "\"chat_messages\".\"status\" in ('sent', 'edited', 'deleted')"
|
|
},
|
|
"chat_messages_sequence_check": {
|
|
"name": "chat_messages_sequence_check",
|
|
"value": "\"chat_messages\".\"sequence\" >= 0"
|
|
}
|
|
},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_mutation_receipts": {
|
|
"name": "chat_mutation_receipts",
|
|
"schema": "",
|
|
"columns": {
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"actor_user_id": {
|
|
"name": "actor_user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"client_mutation_id": {
|
|
"name": "client_mutation_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"operation": {
|
|
"name": "operation",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"fingerprint": {
|
|
"name": "fingerprint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"result": {
|
|
"name": "result",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_mutation_receipts_workspace_id_idx": {
|
|
"name": "chat_mutation_receipts_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_mutation_receipts_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_mutation_receipts_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_mutation_receipts",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_mutation_receipts_workspace_member_fk": {
|
|
"name": "chat_mutation_receipts_workspace_member_fk",
|
|
"tableFrom": "chat_mutation_receipts",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"actor_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"chat_mutation_receipts_workspace_id_actor_user_id_client_mutation_id_pk": {
|
|
"name": "chat_mutation_receipts_workspace_id_actor_user_id_client_mutation_id_pk",
|
|
"columns": [
|
|
"workspace_id",
|
|
"actor_user_id",
|
|
"client_mutation_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_outbox": {
|
|
"name": "chat_outbox",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"message_id": {
|
|
"name": "message_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"event_version": {
|
|
"name": "event_version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"event_type": {
|
|
"name": "event_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"dedupe_key": {
|
|
"name": "dedupe_key",
|
|
"type": "varchar(250)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"payload": {
|
|
"name": "payload",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"published_at": {
|
|
"name": "published_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"attempts": {
|
|
"name": "attempts",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"last_error": {
|
|
"name": "last_error",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_outbox_workspace_id_idx": {
|
|
"name": "chat_outbox_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"chat_outbox_unpublished_idx": {
|
|
"name": "chat_outbox_unpublished_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": "\"chat_outbox\".\"published_at\" is null",
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_outbox_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_outbox_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_outbox",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_outbox_channel_fk": {
|
|
"name": "chat_outbox_channel_fk",
|
|
"tableFrom": "chat_outbox",
|
|
"tableTo": "chat_channels",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_outbox_message_fk": {
|
|
"name": "chat_outbox_message_fk",
|
|
"tableFrom": "chat_outbox",
|
|
"tableTo": "chat_messages",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"message_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"chat_outbox_workspace_id_dedupe_key_unique": {
|
|
"name": "chat_outbox_workspace_id_dedupe_key_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"workspace_id",
|
|
"dedupe_key"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {
|
|
"chat_outbox_event_version_check": {
|
|
"name": "chat_outbox_event_version_check",
|
|
"value": "\"chat_outbox\".\"event_version\" > 0"
|
|
},
|
|
"chat_outbox_attempts_check": {
|
|
"name": "chat_outbox_attempts_check",
|
|
"value": "\"chat_outbox\".\"attempts\" >= 0"
|
|
}
|
|
},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.chat_read_cursors": {
|
|
"name": "chat_read_cursors",
|
|
"schema": "",
|
|
"columns": {
|
|
"workspace_id": {
|
|
"name": "workspace_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sequence": {
|
|
"name": "sequence",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "0"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"chat_read_cursors_workspace_id_idx": {
|
|
"name": "chat_read_cursors_workspace_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "workspace_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"chat_read_cursors_workspace_id_workspaces_id_fk": {
|
|
"name": "chat_read_cursors_workspace_id_workspaces_id_fk",
|
|
"tableFrom": "chat_read_cursors",
|
|
"tableTo": "workspaces",
|
|
"columnsFrom": [
|
|
"workspace_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_read_cursors_channel_fk": {
|
|
"name": "chat_read_cursors_channel_fk",
|
|
"tableFrom": "chat_read_cursors",
|
|
"tableTo": "chat_channels",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"chat_read_cursors_workspace_member_fk": {
|
|
"name": "chat_read_cursors_workspace_member_fk",
|
|
"tableFrom": "chat_read_cursors",
|
|
"tableTo": "workspace_members",
|
|
"columnsFrom": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"workspace_id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"chat_read_cursors_workspace_id_channel_id_user_id_pk": {
|
|
"name": "chat_read_cursors_workspace_id_channel_id_user_id_pk",
|
|
"columns": [
|
|
"workspace_id",
|
|
"channel_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {
|
|
"chat_read_cursors_sequence_check": {
|
|
"name": "chat_read_cursors_sequence_check",
|
|
"value": "\"chat_read_cursors\".\"sequence\" >= 0"
|
|
}
|
|
},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |