2304 lines
60 KiB
JSON
2304 lines
60 KiB
JSON
|
|
{
|
||
|
|
"id": "46c4f6fc-18a6-4700-bd76-46268c905a81",
|
||
|
|
"prevId": "e66776f6-c61c-4741-8259-2aed6755b87f",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"public.object_assignees": {
|
||
|
|
"name": "object_assignees",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"object_id": {
|
||
|
|
"name": "object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"role": {
|
||
|
|
"name": "role",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'assignee'"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"object_assignees_object_id_user_id_unique": {
|
||
|
|
"name": "object_assignees_object_id_user_id_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_assignees_object_id_idx": {
|
||
|
|
"name": "object_assignees_object_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_assignees_user_id_idx": {
|
||
|
|
"name": "object_assignees_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"object_assignees_object_id_objects_id_fk": {
|
||
|
|
"name": "object_assignees_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "object_assignees",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"object_assignees_user_id_users_id_fk": {
|
||
|
|
"name": "object_assignees_user_id_users_id_fk",
|
||
|
|
"tableFrom": "object_assignees",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.objects": {
|
||
|
|
"name": "objects",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "varchar(500)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "''"
|
||
|
|
},
|
||
|
|
"icon": {
|
||
|
|
"name": "icon",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"cover_image": {
|
||
|
|
"name": "cover_image",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"content": {
|
||
|
|
"name": "content",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"template_id": {
|
||
|
|
"name": "template_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_by": {
|
||
|
|
"name": "created_by",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"archived_at": {
|
||
|
|
"name": "archived_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"objects_parent_id_idx": {
|
||
|
|
"name": "objects_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"objects_type_idx": {
|
||
|
|
"name": "objects_type_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"objects_workspace_id_idx": {
|
||
|
|
"name": "objects_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"objects_template_id_idx": {
|
||
|
|
"name": "objects_template_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "template_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"objects_created_by_idx": {
|
||
|
|
"name": "objects_created_by_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "created_by",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"objects_type_workspace_id_idx": {
|
||
|
|
"name": "objects_type_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"objects_created_by_users_id_fk": {
|
||
|
|
"name": "objects_created_by_users_id_fk",
|
||
|
|
"tableFrom": "objects",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"created_by"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"objects_parent_id_objects_id_fk": {
|
||
|
|
"name": "objects_parent_id_objects_id_fk",
|
||
|
|
"tableFrom": "objects",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"objects_workspace_id_objects_id_fk": {
|
||
|
|
"name": "objects_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "objects",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"objects_template_id_templates_id_fk": {
|
||
|
|
"name": "objects_template_id_templates_id_fk",
|
||
|
|
"tableFrom": "objects",
|
||
|
|
"tableTo": "templates",
|
||
|
|
"columnsFrom": [
|
||
|
|
"template_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.workspace_members": {
|
||
|
|
"name": "workspace_members",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"role": {
|
||
|
|
"name": "role",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'member'"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"workspace_members_workspace_id_user_id_unique": {
|
||
|
|
"name": "workspace_members_workspace_id_user_id_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"workspace_members_workspace_id_idx": {
|
||
|
|
"name": "workspace_members_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"workspace_members_user_id_idx": {
|
||
|
|
"name": "workspace_members_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"workspace_members_workspace_id_objects_id_fk": {
|
||
|
|
"name": "workspace_members_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "workspace_members",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"workspace_members_user_id_users_id_fk": {
|
||
|
|
"name": "workspace_members_user_id_users_id_fk",
|
||
|
|
"tableFrom": "workspace_members",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.object_type_defs": {
|
||
|
|
"name": "object_type_defs",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "varchar(100)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"icon": {
|
||
|
|
"name": "icon",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"color": {
|
||
|
|
"name": "color",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"layout": {
|
||
|
|
"name": "layout",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'task'"
|
||
|
|
},
|
||
|
|
"default_properties": {
|
||
|
|
"name": "default_properties",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"object_type_defs_workspace_id_idx": {
|
||
|
|
"name": "object_type_defs_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_type_defs_slug_idx": {
|
||
|
|
"name": "object_type_defs_slug_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "slug",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"object_type_defs_workspace_id_objects_id_fk": {
|
||
|
|
"name": "object_type_defs_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "object_type_defs",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.property_definitions": {
|
||
|
|
"name": "property_definitions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"field_type": {
|
||
|
|
"name": "field_type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"config": {
|
||
|
|
"name": "config",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"property_definitions_workspace_id_idx": {
|
||
|
|
"name": "property_definitions_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"property_definitions_workspace_id_name_idx": {
|
||
|
|
"name": "property_definitions_workspace_id_name_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "name",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"property_definitions_workspace_id_objects_id_fk": {
|
||
|
|
"name": "property_definitions_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "property_definitions",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.property_values": {
|
||
|
|
"name": "property_values",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"object_id": {
|
||
|
|
"name": "object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"property_def_id": {
|
||
|
|
"name": "property_def_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"value": {
|
||
|
|
"name": "value",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"property_values_object_id_property_def_id_unique": {
|
||
|
|
"name": "property_values_object_id_property_def_id_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "property_def_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"property_values_object_id_idx": {
|
||
|
|
"name": "property_values_object_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"property_values_property_def_id_idx": {
|
||
|
|
"name": "property_values_property_def_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "property_def_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"property_values_object_id_objects_id_fk": {
|
||
|
|
"name": "property_values_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "property_values",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"property_values_property_def_id_property_definitions_id_fk": {
|
||
|
|
"name": "property_values_property_def_id_property_definitions_id_fk",
|
||
|
|
"tableFrom": "property_values",
|
||
|
|
"tableTo": "property_definitions",
|
||
|
|
"columnsFrom": [
|
||
|
|
"property_def_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.views": {
|
||
|
|
"name": "views",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"object_id": {
|
||
|
|
"name": "object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"view_type": {
|
||
|
|
"name": "view_type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"config": {
|
||
|
|
"name": "config",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"sort_order": {
|
||
|
|
"name": "sort_order",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": 0
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"views_object_id_idx": {
|
||
|
|
"name": "views_object_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"views_object_id_objects_id_fk": {
|
||
|
|
"name": "views_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "views",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.accounts": {
|
||
|
|
"name": "accounts",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"name": "type",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"provider": {
|
||
|
|
"name": "provider",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"provider_account_id": {
|
||
|
|
"name": "provider_account_id",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"refresh_token": {
|
||
|
|
"name": "refresh_token",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"access_token": {
|
||
|
|
"name": "access_token",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"expires_at": {
|
||
|
|
"name": "expires_at",
|
||
|
|
"type": "integer",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"token_type": {
|
||
|
|
"name": "token_type",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"scope": {
|
||
|
|
"name": "scope",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"id_token": {
|
||
|
|
"name": "id_token",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"session_state": {
|
||
|
|
"name": "session_state",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"accounts_provider_provider_account_id_unique": {
|
||
|
|
"name": "accounts_provider_provider_account_id_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "provider",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "provider_account_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"accounts_user_id_idx": {
|
||
|
|
"name": "accounts_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"accounts_user_id_users_id_fk": {
|
||
|
|
"name": "accounts_user_id_users_id_fk",
|
||
|
|
"tableFrom": "accounts",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.sessions": {
|
||
|
|
"name": "sessions",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"session_token": {
|
||
|
|
"name": "session_token",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"expires": {
|
||
|
|
"name": "expires",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"sessions_user_id_idx": {
|
||
|
|
"name": "sessions_user_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"sessions_user_id_users_id_fk": {
|
||
|
|
"name": "sessions_user_id_users_id_fk",
|
||
|
|
"tableFrom": "sessions",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"sessions_session_token_unique": {
|
||
|
|
"name": "sessions_session_token_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"session_token"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.users": {
|
||
|
|
"name": "users",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"email": {
|
||
|
|
"name": "email",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"avatar_url": {
|
||
|
|
"name": "avatar_url",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"users_email_idx": {
|
||
|
|
"name": "users_email_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "email",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {
|
||
|
|
"users_email_unique": {
|
||
|
|
"name": "users_email_unique",
|
||
|
|
"nullsNotDistinct": false,
|
||
|
|
"columns": [
|
||
|
|
"email"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.verification_tokens": {
|
||
|
|
"name": "verification_tokens",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"identifier": {
|
||
|
|
"name": "identifier",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"token": {
|
||
|
|
"name": "token",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"expires": {
|
||
|
|
"name": "expires",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {},
|
||
|
|
"foreignKeys": {},
|
||
|
|
"compositePrimaryKeys": {
|
||
|
|
"verification_tokens_identifier_token_pk": {
|
||
|
|
"name": "verification_tokens_identifier_token_pk",
|
||
|
|
"columns": [
|
||
|
|
"identifier",
|
||
|
|
"token"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.object_relations": {
|
||
|
|
"name": "object_relations",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"source_id": {
|
||
|
|
"name": "source_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"target_id": {
|
||
|
|
"name": "target_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"relation_type": {
|
||
|
|
"name": "relation_type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"object_relations_source_id_idx": {
|
||
|
|
"name": "object_relations_source_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "source_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_relations_target_id_idx": {
|
||
|
|
"name": "object_relations_target_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "target_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_relations_relation_type_idx": {
|
||
|
|
"name": "object_relations_relation_type_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "relation_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"object_relations_source_target_type_unique": {
|
||
|
|
"name": "object_relations_source_target_type_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "source_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "target_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "relation_type",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"object_relations_source_id_objects_id_fk": {
|
||
|
|
"name": "object_relations_source_id_objects_id_fk",
|
||
|
|
"tableFrom": "object_relations",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"source_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"object_relations_target_id_objects_id_fk": {
|
||
|
|
"name": "object_relations_target_id_objects_id_fk",
|
||
|
|
"tableFrom": "object_relations",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"target_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.templates": {
|
||
|
|
"name": "templates",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"name": {
|
||
|
|
"name": "name",
|
||
|
|
"type": "varchar(255)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"target_type": {
|
||
|
|
"name": "target_type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"schema": {
|
||
|
|
"name": "schema",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"templates_workspace_id_idx": {
|
||
|
|
"name": "templates_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"templates_workspace_id_objects_id_fk": {
|
||
|
|
"name": "templates_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "templates",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.form_responses": {
|
||
|
|
"name": "form_responses",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"form_id": {
|
||
|
|
"name": "form_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"respondent_id": {
|
||
|
|
"name": "respondent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_object_id": {
|
||
|
|
"name": "created_object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"data": {
|
||
|
|
"name": "data",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"submitted_at": {
|
||
|
|
"name": "submitted_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"form_responses_form_id_idx": {
|
||
|
|
"name": "form_responses_form_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "form_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"form_responses_respondent_id_idx": {
|
||
|
|
"name": "form_responses_respondent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "respondent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"form_responses_form_id_forms_id_fk": {
|
||
|
|
"name": "form_responses_form_id_forms_id_fk",
|
||
|
|
"tableFrom": "form_responses",
|
||
|
|
"tableTo": "forms",
|
||
|
|
"columnsFrom": [
|
||
|
|
"form_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"form_responses_respondent_id_users_id_fk": {
|
||
|
|
"name": "form_responses_respondent_id_users_id_fk",
|
||
|
|
"tableFrom": "form_responses",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"respondent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"form_responses_created_object_id_objects_id_fk": {
|
||
|
|
"name": "form_responses_created_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "form_responses",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"created_object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.forms": {
|
||
|
|
"name": "forms",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "varchar(500)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"name": "description",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"cover_image": {
|
||
|
|
"name": "cover_image",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"object_id": {
|
||
|
|
"name": "object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"target_type": {
|
||
|
|
"name": "target_type",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'task'"
|
||
|
|
},
|
||
|
|
"fields": {
|
||
|
|
"name": "fields",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'[]'"
|
||
|
|
},
|
||
|
|
"settings": {
|
||
|
|
"name": "settings",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'{}'"
|
||
|
|
},
|
||
|
|
"is_published": {
|
||
|
|
"name": "is_published",
|
||
|
|
"type": "boolean",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"created_by": {
|
||
|
|
"name": "created_by",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"forms_workspace_id_idx": {
|
||
|
|
"name": "forms_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"forms_object_id_idx": {
|
||
|
|
"name": "forms_object_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"forms_workspace_id_objects_id_fk": {
|
||
|
|
"name": "forms_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "forms",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"forms_object_id_objects_id_fk": {
|
||
|
|
"name": "forms_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "forms",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"forms_created_by_users_id_fk": {
|
||
|
|
"name": "forms_created_by_users_id_fk",
|
||
|
|
"tableFrom": "forms",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"created_by"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.user_favorites": {
|
||
|
|
"name": "user_favorites",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"user_id": {
|
||
|
|
"name": "user_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"object_id": {
|
||
|
|
"name": "object_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"user_favorites_user_object_idx": {
|
||
|
|
"name": "user_favorites_user_object_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "user_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "object_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"user_favorites_user_id_users_id_fk": {
|
||
|
|
"name": "user_favorites_user_id_users_id_fk",
|
||
|
|
"tableFrom": "user_favorites",
|
||
|
|
"tableTo": "users",
|
||
|
|
"columnsFrom": [
|
||
|
|
"user_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"user_favorites_object_id_objects_id_fk": {
|
||
|
|
"name": "user_favorites_object_id_objects_id_fk",
|
||
|
|
"tableFrom": "user_favorites",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"object_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.markdown_backlog_items": {
|
||
|
|
"name": "markdown_backlog_items",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"kind": {
|
||
|
|
"name": "kind",
|
||
|
|
"type": "varchar(20)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "varchar(200)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"plan_slug": {
|
||
|
|
"name": "plan_slug",
|
||
|
|
"type": "varchar(200)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"epic_slug": {
|
||
|
|
"name": "epic_slug",
|
||
|
|
"type": "varchar(200)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"parent_id": {
|
||
|
|
"name": "parent_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"repo_path": {
|
||
|
|
"name": "repo_path",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "varchar(500)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "''"
|
||
|
|
},
|
||
|
|
"status": {
|
||
|
|
"name": "status",
|
||
|
|
"type": "varchar(50)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"priority": {
|
||
|
|
"name": "priority",
|
||
|
|
"type": "varchar(20)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"owner": {
|
||
|
|
"name": "owner",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"frontmatter": {
|
||
|
|
"name": "frontmatter",
|
||
|
|
"type": "jsonb",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"body_markdown": {
|
||
|
|
"name": "body_markdown",
|
||
|
|
"type": "text",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "''"
|
||
|
|
},
|
||
|
|
"content_hash": {
|
||
|
|
"name": "content_hash",
|
||
|
|
"type": "varchar(64)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"markdown_backlog_workspace_repo_path_unique": {
|
||
|
|
"name": "markdown_backlog_workspace_repo_path_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "repo_path",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"markdown_backlog_workspace_plan_idx": {
|
||
|
|
"name": "markdown_backlog_workspace_plan_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "plan_slug",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"markdown_backlog_parent_id_idx": {
|
||
|
|
"name": "markdown_backlog_parent_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "parent_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"markdown_backlog_workspace_kind_idx": {
|
||
|
|
"name": "markdown_backlog_workspace_kind_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"expression": "kind",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"markdown_backlog_items_workspace_id_objects_id_fk": {
|
||
|
|
"name": "markdown_backlog_items_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "markdown_backlog_items",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"markdown_backlog_items_parent_id_markdown_backlog_items_id_fk": {
|
||
|
|
"name": "markdown_backlog_items_parent_id_markdown_backlog_items_id_fk",
|
||
|
|
"tableFrom": "markdown_backlog_items",
|
||
|
|
"tableTo": "markdown_backlog_items",
|
||
|
|
"columnsFrom": [
|
||
|
|
"parent_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "set null",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
},
|
||
|
|
"public.cursor_sync_mappings": {
|
||
|
|
"name": "cursor_sync_mappings",
|
||
|
|
"schema": "",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"workspace_id": {
|
||
|
|
"name": "workspace_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"backlog_item_id": {
|
||
|
|
"name": "backlog_item_id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"cursor_plan_id": {
|
||
|
|
"name": "cursor_plan_id",
|
||
|
|
"type": "varchar(500)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"cursor_item_id": {
|
||
|
|
"name": "cursor_item_id",
|
||
|
|
"type": "varchar(500)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"last_pulled_at": {
|
||
|
|
"name": "last_pulled_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"last_pushed_at": {
|
||
|
|
"name": "last_pushed_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"sync_content_hash": {
|
||
|
|
"name": "sync_content_hash",
|
||
|
|
"type": "varchar(64)",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": false
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
},
|
||
|
|
"updated_at": {
|
||
|
|
"name": "updated_at",
|
||
|
|
"type": "timestamp with time zone",
|
||
|
|
"primaryKey": false,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"cursor_sync_mappings_backlog_item_id_unique": {
|
||
|
|
"name": "cursor_sync_mappings_backlog_item_id_unique",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "backlog_item_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": true,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
},
|
||
|
|
"cursor_sync_mappings_workspace_id_idx": {
|
||
|
|
"name": "cursor_sync_mappings_workspace_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{
|
||
|
|
"expression": "workspace_id",
|
||
|
|
"isExpression": false,
|
||
|
|
"asc": true,
|
||
|
|
"nulls": "last"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"isUnique": false,
|
||
|
|
"concurrently": false,
|
||
|
|
"method": "btree",
|
||
|
|
"with": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"cursor_sync_mappings_workspace_id_objects_id_fk": {
|
||
|
|
"name": "cursor_sync_mappings_workspace_id_objects_id_fk",
|
||
|
|
"tableFrom": "cursor_sync_mappings",
|
||
|
|
"tableTo": "objects",
|
||
|
|
"columnsFrom": [
|
||
|
|
"workspace_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
},
|
||
|
|
"cursor_sync_mappings_backlog_item_id_markdown_backlog_items_id_fk": {
|
||
|
|
"name": "cursor_sync_mappings_backlog_item_id_markdown_backlog_items_id_fk",
|
||
|
|
"tableFrom": "cursor_sync_mappings",
|
||
|
|
"tableTo": "markdown_backlog_items",
|
||
|
|
"columnsFrom": [
|
||
|
|
"backlog_item_id"
|
||
|
|
],
|
||
|
|
"columnsTo": [
|
||
|
|
"id"
|
||
|
|
],
|
||
|
|
"onDelete": "cascade",
|
||
|
|
"onUpdate": "no action"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {},
|
||
|
|
"checkConstraints": {},
|
||
|
|
"isRLSEnabled": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|