4641 lines
117 KiB
JSON
4641 lines
117 KiB
JSON
{
|
|||
|
|
"id": "5f43138d-c7d8-4deb-b039-db806525ef83",
|
||
|
|
"prevId": "71114d3f-02f8-41f3-8cd2-9658b66d2d78",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"public.activity_feed": {
|
||
|
|
"name": "activity_feed",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"actor": {
|
||
|
|
"name": "actor",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"action": {
|
||
|
|
"name": "action",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"changes": {
|
||
|
|
"name": "changes",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"activity_feed_workspace_id_idx": {
|
||
|
|
"name": "activity_feed_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"activity_feed_entity_idx": {
|
||
|
|
"name": "activity_feed_entity_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "entity_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "entity_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"activity_feed_created_at_idx": {
|
||
|
|
"name": "activity_feed_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"activity_feed_actor_idx": {
|
||
|
|
"name": "activity_feed_actor_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "actor",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"activity_feed_workspace_id_domains_id_fk": {
|
||
|
|
"name": "activity_feed_workspace_id_domains_id_fk",
|
||
|
|
"tableFrom": "activity_feed",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.agent_activity": {
|
||
|
|
"name": "agent_activity",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"agent_id": {
|
||
|
|
"name": "agent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"action": {
|
||
|
|
"name": "action",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"details": {
|
||
|
|
"name": "details",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"success": {
|
||
|
|
"name": "success",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"error_message": {
|
||
|
|
"name": "error_message",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"agent_activity_agent_id_idx": {
|
||
|
|
"name": "agent_activity_agent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "agent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"agent_activity_created_at_idx": {
|
||
|
|
"name": "agent_activity_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"agent_activity_agent_id_agents_id_fk": {
|
||
|
|
"name": "agent_activity_agent_id_agents_id_fk",
|
||
|
|
"tableFrom": "agent_activity",
|
||
|
|
"tableTo": "agents",
|
||
|
|
"columnsFrom": [
|
||
|
|
"agent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.agent_tasks": {
|
||
|
|
"name": "agent_tasks",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"agent_id": {
|
||
|
|
"name": "agent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"task_type": {
|
||
|
|
"name": "task_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"input": {
|
||
|
|
"name": "input",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pending'"
|
||
|
|
},
|
||
|
|
"output": {
|
||
|
|
"name": "output",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"error_message": {
|
||
|
|
"name": "error_message",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"started_at": {
|
||
|
|
"name": "started_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"completed_at": {
|
||
|
|
"name": "completed_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": {
|
||
|
|
"agent_tasks_agent_id_idx": {
|
||
|
|
"name": "agent_tasks_agent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "agent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"agent_tasks_status_idx": {
|
||
|
|
"name": "agent_tasks_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"agent_tasks_agent_id_agents_id_fk": {
|
||
|
|
"name": "agent_tasks_agent_id_agents_id_fk",
|
||
|
|
"tableFrom": "agent_tasks",
|
||
|
|
"tableTo": "agents",
|
||
|
|
"columnsFrom": [
|
||
|
|
"agent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.agents": {
|
||
|
|
"name": "agents",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'active'"
|
||
|
|
},
|
||
|
|
"permission_tier": {
|
||
|
|
"name": "permission_tier",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'read_only'"
|
||
|
|
},
|
||
|
|
"custom_permissions": {
|
||
|
|
"name": "custom_permissions",
|
||
|
|
"type": "text[]",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"api_key": {
|
||
|
|
"name": "api_key",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"last_active_at": {
|
||
|
|
"name": "last_active_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tags": {
|
||
|
|
"name": "tags",
|
||
|
|
"type": "text[]",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"config": {
|
||
|
|
"name": "config",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"agents_domain_id_idx": {
|
||
|
|
"name": "agents_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"agents_status_idx": {
|
||
|
|
"name": "agents_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"agents_domain_id_domains_id_fk": {
|
||
|
|
"name": "agents_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "agents",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.api_keys": {
|
||
|
|
"name": "api_keys",
|
||
|
|
"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
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"key_hash": {
|
||
|
|
"name": "key_hash",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"key_prefix": {
|
||
|
|
"name": "key_prefix",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"active": {
|
||
|
|
"name": "active",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"last_used_at": {
|
||
|
|
"name": "last_used_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": {
|
||
|
|
"api_keys_user_id_idx": {
|
||
|
|
"name": "api_keys_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"api_keys_key_hash_idx": {
|
||
|
|
"name": "api_keys_key_hash_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "key_hash",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"api_keys_active_idx": {
|
||
|
|
"name": "api_keys_active_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "active",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"api_keys_user_id_users_id_fk": {
|
||
|
|
"name": "api_keys_user_id_users_id_fk",
|
||
|
|
"tableFrom": "api_keys",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.calendar_events": {
|
||
|
|
"name": "calendar_events",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"start_time": {
|
||
|
|
"name": "start_time",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"end_time": {
|
||
|
|
"name": "end_time",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"all_day": {
|
||
|
|
"name": "all_day",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"recurrence_rule": {
|
||
|
|
"name": "recurrence_rule",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"calendar_events_domain_id_idx": {
|
||
|
|
"name": "calendar_events_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"calendar_events_start_time_idx": {
|
||
|
|
"name": "calendar_events_start_time_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "start_time",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"calendar_events_end_time_idx": {
|
||
|
|
"name": "calendar_events_end_time_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "end_time",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"calendar_events_domain_id_domains_id_fk": {
|
||
|
|
"name": "calendar_events_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "calendar_events",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.canvas_cards": {
|
||
|
|
"name": "canvas_cards",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"canvas_id": {
|
||
|
|
"name": "canvas_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'note'"
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"x": {
|
||
|
|
"name": "x",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"y": {
|
||
|
|
"name": "y",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"width": {
|
||
|
|
"name": "width",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 200
|
||
|
|
},
|
||
|
|
"height": {
|
||
|
|
"name": "height",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 150
|
||
|
|
},
|
||
|
|
"rotation": {
|
||
|
|
"name": "rotation",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"z_index": {
|
||
|
|
"name": "z_index",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"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": {
|
||
|
|
"canvas_cards_canvas_id_idx": {
|
||
|
|
"name": "canvas_cards_canvas_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "canvas_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"canvas_cards_canvas_id_canvases_id_fk": {
|
||
|
|
"name": "canvas_cards_canvas_id_canvases_id_fk",
|
||
|
|
"tableFrom": "canvas_cards",
|
||
|
|
"tableTo": "canvases",
|
||
|
|
"columnsFrom": [
|
||
|
|
"canvas_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.canvas_connections": {
|
||
|
|
"name": "canvas_connections",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"canvas_id": {
|
||
|
|
"name": "canvas_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"source_card_id": {
|
||
|
|
"name": "source_card_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"target_card_id": {
|
||
|
|
"name": "target_card_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"label": {
|
||
|
|
"name": "label",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"style": {
|
||
|
|
"name": "style",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'solid'"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"canvas_connections_canvas_id_idx": {
|
||
|
|
"name": "canvas_connections_canvas_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "canvas_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"canvas_connections_canvas_id_canvases_id_fk": {
|
||
|
|
"name": "canvas_connections_canvas_id_canvases_id_fk",
|
||
|
|
"tableFrom": "canvas_connections",
|
||
|
|
"tableTo": "canvases",
|
||
|
|
"columnsFrom": [
|
||
|
|
"canvas_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"canvas_connections_source_card_id_canvas_cards_id_fk": {
|
||
|
|
"name": "canvas_connections_source_card_id_canvas_cards_id_fk",
|
||
|
|
"tableFrom": "canvas_connections",
|
||
|
|
"tableTo": "canvas_cards",
|
||
|
|
"columnsFrom": [
|
||
|
|
"source_card_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"canvas_connections_target_card_id_canvas_cards_id_fk": {
|
||
|
|
"name": "canvas_connections_target_card_id_canvas_cards_id_fk",
|
||
|
|
"tableFrom": "canvas_connections",
|
||
|
|
"tableTo": "canvas_cards",
|
||
|
|
"columnsFrom": [
|
||
|
|
"target_card_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.canvases": {
|
||
|
|
"name": "canvases",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"mode": {
|
||
|
|
"name": "mode",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'freeform'"
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tags": {
|
||
|
|
"name": "tags",
|
||
|
|
"type": "text[]",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"viewport": {
|
||
|
|
"name": "viewport",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{\"x\":0,\"y\":0,\"zoom\":1}'::jsonb"
|
||
|
|
},
|
||
|
|
"background": {
|
||
|
|
"name": "background",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"canvases_domain_id_idx": {
|
||
|
|
"name": "canvases_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"canvases_domain_id_domains_id_fk": {
|
||
|
|
"name": "canvases_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "canvases",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.comments": {
|
||
|
|
"name": "comments",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"author": {
|
||
|
|
"name": "author",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"deleted_at": {
|
||
|
|
"name": "deleted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"comments_workspace_id_idx": {
|
||
|
|
"name": "comments_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"comments_entity_idx": {
|
||
|
|
"name": "comments_entity_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "entity_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "entity_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"comments_parent_id_idx": {
|
||
|
|
"name": "comments_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"comments_created_at_idx": {
|
||
|
|
"name": "comments_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"comments_workspace_id_domains_id_fk": {
|
||
|
|
"name": "comments_workspace_id_domains_id_fk",
|
||
|
|
"tableFrom": "comments",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"comments_parent_id_comments_id_fk": {
|
||
|
|
"name": "comments_parent_id_comments_id_fk",
|
||
|
|
"tableFrom": "comments",
|
||
|
|
"tableTo": "comments",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'text'"
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"required": {
|
||
|
|
"name": "required",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"options": {
|
||
|
|
"name": "options",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'[]'::jsonb"
|
||
|
|
},
|
||
|
|
"default_value": {
|
||
|
|
"name": "default_value",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"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": {
|
||
|
|
"custom_fields_domain_id_idx": {
|
||
|
|
"name": "custom_fields_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"custom_fields_entity_type_idx": {
|
||
|
|
"name": "custom_fields_entity_type_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "entity_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"custom_fields_domain_id_domains_id_fk": {
|
||
|
|
"name": "custom_fields_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "custom_fields",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.daily_notes": {
|
||
|
|
"name": "daily_notes",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"date": {
|
||
|
|
"name": "date",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"mood": {
|
||
|
|
"name": "mood",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"energy": {
|
||
|
|
"name": "energy",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"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": {
|
||
|
|
"daily_notes_domain_id_idx": {
|
||
|
|
"name": "daily_notes_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"daily_notes_date_idx": {
|
||
|
|
"name": "daily_notes_date_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "date",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"daily_notes_date_domain_idx": {
|
||
|
|
"name": "daily_notes_date_domain_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "date",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"daily_notes_domain_id_domains_id_fk": {
|
||
|
|
"name": "daily_notes_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "daily_notes",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.dashboard_widgets": {
|
||
|
|
"name": "dashboard_widgets",
|
||
|
|
"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": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"config": {
|
||
|
|
"name": "config",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"layout": {
|
||
|
|
"name": "layout",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{\"x\":0,\"y\":0,\"w\":2,\"h\":2}'::jsonb"
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"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()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"dashboard_widgets_user_id_idx": {
|
||
|
|
"name": "dashboard_widgets_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"dashboard_widgets_domain_id_idx": {
|
||
|
|
"name": "dashboard_widgets_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"dashboard_widgets_user_id_users_id_fk": {
|
||
|
|
"name": "dashboard_widgets_user_id_users_id_fk",
|
||
|
|
"tableFrom": "dashboard_widgets",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"dashboard_widgets_domain_id_domains_id_fk": {
|
||
|
|
"name": "dashboard_widgets_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "dashboard_widgets",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.domains": {
|
||
|
|
"name": "domains",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"icon": {
|
||
|
|
"name": "icon",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"owner_id": {
|
||
|
|
"name": "owner_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"search_vector": {
|
||
|
|
"name": "search_vector",
|
||
|
|
"type": "tsvector",
|
||
|
|
"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": {
|
||
|
|
"domains_parent_id_idx": {
|
||
|
|
"name": "domains_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"domains_slug_idx": {
|
||
|
|
"name": "domains_slug_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "slug",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"domains_search_idx": {
|
||
|
|
"name": "domains_search_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "search_vector",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "gin",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"domains_owner_id_users_id_fk": {
|
||
|
|
"name": "domains_owner_id_users_id_fk",
|
||
|
|
"tableFrom": "domains",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"owner_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"domains_parent_id_domains_id_fk": {
|
||
|
|
"name": "domains_parent_id_domains_id_fk",
|
||
|
|
"tableFrom": "domains",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"domains_slug_unique": {
|
||
|
|
"name": "domains_slug_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"slug"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.error_logs": {
|
||
|
|
"name": "error_logs",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"level": {
|
||
|
|
"name": "level",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'error'"
|
||
|
|
},
|
||
|
|
"source": {
|
||
|
|
"name": "source",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"message": {
|
||
|
|
"name": "message",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"stack_trace": {
|
||
|
|
"name": "stack_trace",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"metadata": {
|
||
|
|
"name": "metadata",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"resolved": {
|
||
|
|
"name": "resolved",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 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": {
|
||
|
|
"error_logs_level_idx": {
|
||
|
|
"name": "error_logs_level_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "level",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"error_logs_created_at_idx": {
|
||
|
|
"name": "error_logs_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"error_logs_resolved_idx": {
|
||
|
|
"name": "error_logs_resolved_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "resolved",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.habit_completions": {
|
||
|
|
"name": "habit_completions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"habit_id": {
|
||
|
|
"name": "habit_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"date": {
|
||
|
|
"name": "date",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"value": {
|
||
|
|
"name": "value",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 1
|
||
|
|
},
|
||
|
|
"mood": {
|
||
|
|
"name": "mood",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"notes": {
|
||
|
|
"name": "notes",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"habit_completions_habit_id_idx": {
|
||
|
|
"name": "habit_completions_habit_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "habit_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"habit_completions_date_idx": {
|
||
|
|
"name": "habit_completions_date_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "habit_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "date",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"habit_completions_habit_id_habits_id_fk": {
|
||
|
|
"name": "habit_completions_habit_id_habits_id_fk",
|
||
|
|
"tableFrom": "habit_completions",
|
||
|
|
"tableTo": "habits",
|
||
|
|
"columnsFrom": [
|
||
|
|
"habit_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.habit_tags": {
|
||
|
|
"name": "habit_tags",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"habit_id": {
|
||
|
|
"name": "habit_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tag_id": {
|
||
|
|
"name": "tag_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"habit_tags_tag_id_idx": {
|
||
|
|
"name": "habit_tags_tag_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tag_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"habit_tags_habit_id_habits_id_fk": {
|
||
|
|
"name": "habit_tags_habit_id_habits_id_fk",
|
||
|
|
"tableFrom": "habit_tags",
|
||
|
|
"tableTo": "habits",
|
||
|
|
"columnsFrom": [
|
||
|
|
"habit_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"habit_tags_tag_id_tags_id_fk": {
|
||
|
|
"name": "habit_tags_tag_id_tags_id_fk",
|
||
|
|
"tableFrom": "habit_tags",
|
||
|
|
"tableTo": "tags",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tag_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"habit_tags_habit_id_tag_id_pk": {
|
||
|
|
"name": "habit_tags_habit_id_tag_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"habit_id",
|
||
|
|
"tag_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.habits": {
|
||
|
|
"name": "habits",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"frequency": {
|
||
|
|
"name": "frequency",
|
||
|
|
"type": "habit_frequency",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'daily'"
|
||
|
|
},
|
||
|
|
"difficulty": {
|
||
|
|
"name": "difficulty",
|
||
|
|
"type": "habit_difficulty",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'medium'"
|
||
|
|
},
|
||
|
|
"goal_per_period": {
|
||
|
|
"name": "goal_per_period",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 1
|
||
|
|
},
|
||
|
|
"unit": {
|
||
|
|
"name": "unit",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"reminder_time": {
|
||
|
|
"name": "reminder_time",
|
||
|
|
"type": "time",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"skip_days": {
|
||
|
|
"name": "skip_days",
|
||
|
|
"type": "integer[]",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"streak_count": {
|
||
|
|
"name": "streak_count",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"best_streak": {
|
||
|
|
"name": "best_streak",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"mood_tracking": {
|
||
|
|
"name": "mood_tracking",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"active": {
|
||
|
|
"name": "active",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"search_vector": {
|
||
|
|
"name": "search_vector",
|
||
|
|
"type": "tsvector",
|
||
|
|
"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()"
|
||
|
|
},
|
||
|
|
"deleted_at": {
|
||
|
|
"name": "deleted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"habits_domain_id_idx": {
|
||
|
|
"name": "habits_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"habits_active_idx": {
|
||
|
|
"name": "habits_active_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "active",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"habits_deleted_at_idx": {
|
||
|
|
"name": "habits_deleted_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "deleted_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"habits_search_idx": {
|
||
|
|
"name": "habits_search_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "search_vector",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "gin",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"habits_domain_id_domains_id_fk": {
|
||
|
|
"name": "habits_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "habits",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.jobs": {
|
||
|
|
"name": "jobs",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"payload": {
|
||
|
|
"name": "payload",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "job_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pending'"
|
||
|
|
},
|
||
|
|
"attempts": {
|
||
|
|
"name": "attempts",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"max_attempts": {
|
||
|
|
"name": "max_attempts",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 3
|
||
|
|
},
|
||
|
|
"next_retry_at": {
|
||
|
|
"name": "next_retry_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"last_error": {
|
||
|
|
"name": "last_error",
|
||
|
|
"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": {
|
||
|
|
"jobs_status_idx": {
|
||
|
|
"name": "jobs_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"jobs_type_idx": {
|
||
|
|
"name": "jobs_type_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"jobs_next_retry_at_idx": {
|
||
|
|
"name": "jobs_next_retry_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "next_retry_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.note_entity_links": {
|
||
|
|
"name": "note_entity_links",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"note_id": {
|
||
|
|
"name": "note_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"note_entity_links_entity_idx": {
|
||
|
|
"name": "note_entity_links_entity_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "entity_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "entity_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"note_entity_links_note_id_idx": {
|
||
|
|
"name": "note_entity_links_note_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "note_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"note_entity_links_note_id_notes_id_fk": {
|
||
|
|
"name": "note_entity_links_note_id_notes_id_fk",
|
||
|
|
"tableFrom": "note_entity_links",
|
||
|
|
"tableTo": "notes",
|
||
|
|
"columnsFrom": [
|
||
|
|
"note_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.note_links": {
|
||
|
|
"name": "note_links",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"source_note_id": {
|
||
|
|
"name": "source_note_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"target_note_id": {
|
||
|
|
"name": "target_note_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"note_links_target_note_id_idx": {
|
||
|
|
"name": "note_links_target_note_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "target_note_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"note_links_source_note_id_notes_id_fk": {
|
||
|
|
"name": "note_links_source_note_id_notes_id_fk",
|
||
|
|
"tableFrom": "note_links",
|
||
|
|
"tableTo": "notes",
|
||
|
|
"columnsFrom": [
|
||
|
|
"source_note_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"note_links_target_note_id_notes_id_fk": {
|
||
|
|
"name": "note_links_target_note_id_notes_id_fk",
|
||
|
|
"tableFrom": "note_links",
|
||
|
|
"tableTo": "notes",
|
||
|
|
"columnsFrom": [
|
||
|
|
"target_note_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"note_links_source_note_id_target_note_id_pk": {
|
||
|
|
"name": "note_links_source_note_id_target_note_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"source_note_id",
|
||
|
|
"target_note_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.note_tags": {
|
||
|
|
"name": "note_tags",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"note_id": {
|
||
|
|
"name": "note_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tag_id": {
|
||
|
|
"name": "tag_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"note_tags_tag_id_idx": {
|
||
|
|
"name": "note_tags_tag_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tag_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"note_tags_note_id_notes_id_fk": {
|
||
|
|
"name": "note_tags_note_id_notes_id_fk",
|
||
|
|
"tableFrom": "note_tags",
|
||
|
|
"tableTo": "notes",
|
||
|
|
"columnsFrom": [
|
||
|
|
"note_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"note_tags_tag_id_tags_id_fk": {
|
||
|
|
"name": "note_tags_tag_id_tags_id_fk",
|
||
|
|
"tableFrom": "note_tags",
|
||
|
|
"tableTo": "tags",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tag_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"note_tags_note_id_tag_id_pk": {
|
||
|
|
"name": "note_tags_note_id_tag_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"note_id",
|
||
|
|
"tag_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.notes": {
|
||
|
|
"name": "notes",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"is_pinned": {
|
||
|
|
"name": "is_pinned",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"is_archived": {
|
||
|
|
"name": "is_archived",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"search_vector": {
|
||
|
|
"name": "search_vector",
|
||
|
|
"type": "tsvector",
|
||
|
|
"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()"
|
||
|
|
},
|
||
|
|
"deleted_at": {
|
||
|
|
"name": "deleted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"notes_domain_id_idx": {
|
||
|
|
"name": "notes_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"notes_is_pinned_idx": {
|
||
|
|
"name": "notes_is_pinned_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "is_pinned",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"notes_is_archived_idx": {
|
||
|
|
"name": "notes_is_archived_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "is_archived",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"notes_deleted_at_idx": {
|
||
|
|
"name": "notes_deleted_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "deleted_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"notes_search_idx": {
|
||
|
|
"name": "notes_search_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "search_vector",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "gin",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"notes_domain_id_domains_id_fk": {
|
||
|
|
"name": "notes_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "notes",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.project_tags": {
|
||
|
|
"name": "project_tags",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"project_id": {
|
||
|
|
"name": "project_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tag_id": {
|
||
|
|
"name": "tag_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"project_tags_tag_id_idx": {
|
||
|
|
"name": "project_tags_tag_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tag_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"project_tags_project_id_projects_id_fk": {
|
||
|
|
"name": "project_tags_project_id_projects_id_fk",
|
||
|
|
"tableFrom": "project_tags",
|
||
|
|
"tableTo": "projects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"project_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"project_tags_tag_id_tags_id_fk": {
|
||
|
|
"name": "project_tags_tag_id_tags_id_fk",
|
||
|
|
"tableFrom": "project_tags",
|
||
|
|
"tableTo": "tags",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tag_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"project_tags_project_id_tag_id_pk": {
|
||
|
|
"name": "project_tags_project_id_tag_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"project_id",
|
||
|
|
"tag_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.projects": {
|
||
|
|
"name": "projects",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "project_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'active'"
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"icon": {
|
||
|
|
"name": "icon",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"target_date": {
|
||
|
|
"name": "target_date",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"search_vector": {
|
||
|
|
"name": "search_vector",
|
||
|
|
"type": "tsvector",
|
||
|
|
"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()"
|
||
|
|
},
|
||
|
|
"deleted_at": {
|
||
|
|
"name": "deleted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"projects_domain_id_idx": {
|
||
|
|
"name": "projects_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"projects_status_idx": {
|
||
|
|
"name": "projects_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"projects_deleted_at_idx": {
|
||
|
|
"name": "projects_deleted_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "deleted_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"projects_search_idx": {
|
||
|
|
"name": "projects_search_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "search_vector",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "gin",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"projects_domain_id_domains_id_fk": {
|
||
|
|
"name": "projects_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "projects",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.reports": {
|
||
|
|
"name": "reports",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'Untitled report'"
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"report_type": {
|
||
|
|
"name": "report_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'custom'"
|
||
|
|
},
|
||
|
|
"date_range_start": {
|
||
|
|
"name": "date_range_start",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"date_range_end": {
|
||
|
|
"name": "date_range_end",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"domain": {
|
||
|
|
"name": "domain",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'personal'"
|
||
|
|
},
|
||
|
|
"project_id": {
|
||
|
|
"name": "project_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"is_draft": {
|
||
|
|
"name": "is_draft",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"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": {
|
||
|
|
"reports_domain_idx": {
|
||
|
|
"name": "reports_domain_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"reports_type_idx": {
|
||
|
|
"name": "reports_type_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "report_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"reports_created_at_idx": {
|
||
|
|
"name": "reports_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"reports_project_id_projects_id_fk": {
|
||
|
|
"name": "reports_project_id_projects_id_fk",
|
||
|
|
"tableFrom": "reports",
|
||
|
|
"tableTo": "projects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"project_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.scheduled_jobs": {
|
||
|
|
"name": "scheduled_jobs",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"entity_type": {
|
||
|
|
"name": "entity_type",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"entity_id": {
|
||
|
|
"name": "entity_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"recurrence_rule": {
|
||
|
|
"name": "recurrence_rule",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"next_occurrence_at": {
|
||
|
|
"name": "next_occurrence_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"last_spawned_at": {
|
||
|
|
"name": "last_spawned_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": {
|
||
|
|
"scheduled_jobs_next_occurrence_idx": {
|
||
|
|
"name": "scheduled_jobs_next_occurrence_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "next_occurrence_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"scheduled_jobs_entity_idx": {
|
||
|
|
"name": "scheduled_jobs_entity_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "entity_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "entity_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.sections": {
|
||
|
|
"name": "sections",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"project_id": {
|
||
|
|
"name": "project_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"kind": {
|
||
|
|
"name": "kind",
|
||
|
|
"type": "section_kind",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'section'"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "section_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'planned'"
|
||
|
|
},
|
||
|
|
"target_date": {
|
||
|
|
"name": "target_date",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"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": {
|
||
|
|
"sections_project_id_idx": {
|
||
|
|
"name": "sections_project_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "project_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"sections_kind_idx": {
|
||
|
|
"name": "sections_kind_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "kind",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"sections_sort_order_idx": {
|
||
|
|
"name": "sections_sort_order_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "project_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "sort_order",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"sections_project_id_projects_id_fk": {
|
||
|
|
"name": "sections_project_id_projects_id_fk",
|
||
|
|
"tableFrom": "sections",
|
||
|
|
"tableTo": "projects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"project_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tags": {
|
||
|
|
"name": "tags",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"scope": {
|
||
|
|
"name": "scope",
|
||
|
|
"type": "tag_scope",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'global'"
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"tags_parent_id_idx": {
|
||
|
|
"name": "tags_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tags_scope_idx": {
|
||
|
|
"name": "tags_scope_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "scope",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tags_parent_id_tags_id_fk": {
|
||
|
|
"name": "tags_parent_id_tags_id_fk",
|
||
|
|
"tableFrom": "tags",
|
||
|
|
"tableTo": "tags",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.task_dependencies": {
|
||
|
|
"name": "task_dependencies",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"task_id": {
|
||
|
|
"name": "task_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"depends_on_task_id": {
|
||
|
|
"name": "depends_on_task_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"task_dependencies_depends_on_idx": {
|
||
|
|
"name": "task_dependencies_depends_on_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "depends_on_task_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"task_dependencies_task_id_tasks_id_fk": {
|
||
|
|
"name": "task_dependencies_task_id_tasks_id_fk",
|
||
|
|
"tableFrom": "task_dependencies",
|
||
|
|
"tableTo": "tasks",
|
||
|
|
"columnsFrom": [
|
||
|
|
"task_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"task_dependencies_depends_on_task_id_tasks_id_fk": {
|
||
|
|
"name": "task_dependencies_depends_on_task_id_tasks_id_fk",
|
||
|
|
"tableFrom": "task_dependencies",
|
||
|
|
"tableTo": "tasks",
|
||
|
|
"columnsFrom": [
|
||
|
|
"depends_on_task_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"task_dependencies_task_id_depends_on_task_id_pk": {
|
||
|
|
"name": "task_dependencies_task_id_depends_on_task_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"task_id",
|
||
|
|
"depends_on_task_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.task_tags": {
|
||
|
|
"name": "task_tags",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"task_id": {
|
||
|
|
"name": "task_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"tag_id": {
|
||
|
|
"name": "tag_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"task_tags_tag_id_idx": {
|
||
|
|
"name": "task_tags_tag_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "tag_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"task_tags_task_id_tasks_id_fk": {
|
||
|
|
"name": "task_tags_task_id_tasks_id_fk",
|
||
|
|
"tableFrom": "task_tags",
|
||
|
|
"tableTo": "tasks",
|
||
|
|
"columnsFrom": [
|
||
|
|
"task_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"task_tags_tag_id_tags_id_fk": {
|
||
|
|
"name": "task_tags_tag_id_tags_id_fk",
|
||
|
|
"tableFrom": "task_tags",
|
||
|
|
"tableTo": "tags",
|
||
|
|
"columnsFrom": [
|
||
|
|
"tag_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"task_tags_task_id_tag_id_pk": {
|
||
|
|
"name": "task_tags_task_id_tag_id_pk",
|
||
|
|
"columns": [
|
||
|
|
"task_id",
|
||
|
|
"tag_id"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.tasks": {
|
||
|
|
"name": "tasks",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "task_status",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'todo'"
|
||
|
|
},
|
||
|
|
"priority": {
|
||
|
|
"name": "priority",
|
||
|
|
"type": "task_priority",
|
||
|
|
"typeSchema": "public",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'medium'"
|
||
|
|
},
|
||
|
|
"domain_id": {
|
||
|
|
"name": "domain_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"project_id": {
|
||
|
|
"name": "project_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"section_id": {
|
||
|
|
"name": "section_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"due_date": {
|
||
|
|
"name": "due_date",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"completed_at": {
|
||
|
|
"name": "completed_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"estimated_minutes": {
|
||
|
|
"name": "estimated_minutes",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"tracked_minutes": {
|
||
|
|
"name": "tracked_minutes",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"recurrence_rule": {
|
||
|
|
"name": "recurrence_rule",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"order": {
|
||
|
|
"name": "order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"custom_fields": {
|
||
|
|
"name": "custom_fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"search_vector": {
|
||
|
|
"name": "search_vector",
|
||
|
|
"type": "tsvector",
|
||
|
|
"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()"
|
||
|
|
},
|
||
|
|
"deleted_at": {
|
||
|
|
"name": "deleted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"tasks_domain_id_idx": {
|
||
|
|
"name": "tasks_domain_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "domain_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_project_id_idx": {
|
||
|
|
"name": "tasks_project_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "project_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_section_id_idx": {
|
||
|
|
"name": "tasks_section_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "section_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_parent_id_idx": {
|
||
|
|
"name": "tasks_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_status_idx": {
|
||
|
|
"name": "tasks_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_priority_idx": {
|
||
|
|
"name": "tasks_priority_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "priority",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_due_date_idx": {
|
||
|
|
"name": "tasks_due_date_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "due_date",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_order_idx": {
|
||
|
|
"name": "tasks_order_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "order",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_deleted_at_idx": {
|
||
|
|
"name": "tasks_deleted_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "deleted_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"tasks_search_idx": {
|
||
|
|
"name": "tasks_search_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "search_vector",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "gin",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"tasks_domain_id_domains_id_fk": {
|
||
|
|
"name": "tasks_domain_id_domains_id_fk",
|
||
|
|
"tableFrom": "tasks",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"domain_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"tasks_project_id_projects_id_fk": {
|
||
|
|
"name": "tasks_project_id_projects_id_fk",
|
||
|
|
"tableFrom": "tasks",
|
||
|
|
"tableTo": "projects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"project_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"tasks_section_id_sections_id_fk": {
|
||
|
|
"name": "tasks_section_id_sections_id_fk",
|
||
|
|
"tableFrom": "tasks",
|
||
|
|
"tableTo": "sections",
|
||
|
|
"columnsFrom": [
|
||
|
|
"section_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"tasks_parent_id_tasks_id_fk": {
|
||
|
|
"name": "tasks_parent_id_tasks_id_fk",
|
||
|
|
"tableFrom": "tasks",
|
||
|
|
"tableTo": "tasks",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"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": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"password_hash": {
|
||
|
|
"name": "password_hash",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"passkey_credential_id": {
|
||
|
|
"name": "passkey_credential_id",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"passkey_public_key": {
|
||
|
|
"name": "passkey_public_key",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"passkey_counter": {
|
||
|
|
"name": "passkey_counter",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"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": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"users_email_unique": {
|
||
|
|
"name": "users_email_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"email"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.webhook_deliveries": {
|
||
|
|
"name": "webhook_deliveries",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"webhook_id": {
|
||
|
|
"name": "webhook_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"event": {
|
||
|
|
"name": "event",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"payload": {
|
||
|
|
"name": "payload",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'::jsonb"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'pending'"
|
||
|
|
},
|
||
|
|
"status_code": {
|
||
|
|
"name": "status_code",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"response_body": {
|
||
|
|
"name": "response_body",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"attempts": {
|
||
|
|
"name": "attempts",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"webhook_deliveries_webhook_id_idx": {
|
||
|
|
"name": "webhook_deliveries_webhook_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "webhook_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"webhook_deliveries_status_idx": {
|
||
|
|
"name": "webhook_deliveries_status_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "status",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"webhook_deliveries_created_at_idx": {
|
||
|
|
"name": "webhook_deliveries_created_at_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_at",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"webhook_deliveries_webhook_id_webhooks_id_fk": {
|
||
|
|
"name": "webhook_deliveries_webhook_id_webhooks_id_fk",
|
||
|
|
"tableFrom": "webhook_deliveries",
|
||
|
|
"tableTo": "webhooks",
|
||
|
|
"columnsFrom": [
|
||
|
|
"webhook_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.webhooks": {
|
||
|
|
"name": "webhooks",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"url": {
|
||
|
|
"name": "url",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"secret": {
|
||
|
|
"name": "secret",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"events": {
|
||
|
|
"name": "events",
|
||
|
|
"type": "text[]",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"active": {
|
||
|
|
"name": "active",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false,
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"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()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"webhooks_workspace_id_idx": {
|
||
|
|
"name": "webhooks_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"webhooks_active_idx": {
|
||
|
|
"name": "webhooks_active_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "active",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"webhooks_workspace_id_domains_id_fk": {
|
||
|
|
"name": "webhooks_workspace_id_domains_id_fk",
|
||
|
|
"tableFrom": "webhooks",
|
||
|
|
"tableTo": "domains",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {
|
||
|
|
"public.habit_difficulty": {
|
||
|
|
"name": "habit_difficulty",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"easy",
|
||
|
|
"medium",
|
||
|
|
"hard"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.habit_frequency": {
|
||
|
|
"name": "habit_frequency",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"daily",
|
||
|
|
"weekly",
|
||
|
|
"custom"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.job_status": {
|
||
|
|
"name": "job_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"pending",
|
||
|
|
"processing",
|
||
|
|
"completed",
|
||
|
|
"failed"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.project_status": {
|
||
|
|
"name": "project_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"active",
|
||
|
|
"paused",
|
||
|
|
"completed",
|
||
|
|
"archived"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.section_kind": {
|
||
|
|
"name": "section_kind",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"section",
|
||
|
|
"milestone"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.section_status": {
|
||
|
|
"name": "section_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"planned",
|
||
|
|
"in_progress",
|
||
|
|
"complete"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.tag_scope": {
|
||
|
|
"name": "tag_scope",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"global",
|
||
|
|
"tasks",
|
||
|
|
"habits",
|
||
|
|
"projects",
|
||
|
|
"notes"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.task_priority": {
|
||
|
|
"name": "task_priority",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"low",
|
||
|
|
"medium",
|
||
|
|
"high",
|
||
|
|
"urgent"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"public.task_status": {
|
||
|
|
"name": "task_status",
|
||
|
|
"schema": "public",
|
||
|
|
"values": [
|
||
|
|
"todo",
|
||
|
|
"in_progress",
|
||
|
|
"done",
|
||
|
|
"cancelled"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|