mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 05:16:50 +01:00
chore(db): regenerate skill package migration after GitHub review migration
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
dc40cb6958
commit
62553671a0
5 files changed
+365
-5
No files matched your search
+1
-1
@@ -1256,7 +1256,7 @@ transaction boundary.
|
|||||||
|
|
||||||
`company_skill_repository_snapshots` retains its identity and company/content-hash
|
`company_skill_repository_snapshots` retains its identity and company/content-hash
|
||||||
uniqueness. Despite its historical name, it can also hold editable skill packages.
|
uniqueness. Despite its historical name, it can also hold editable skill packages.
|
||||||
Migration 0402 (`0402_empty_overlord.sql`) adds `storage` (archive/manifest receipts) and `upload` (a bounded
|
Migration 0403 (`0403_sad_captain_america.sql`) adds `storage` (archive/manifest receipts) and `upload` (a bounded
|
||||||
pending attempt). `file_inventory` remains the legacy payload, defaulting to `[]`.
|
pending attempt). `file_inventory` remains the legacy payload, defaulting to `[]`.
|
||||||
`company_skill_versions.package_snapshot_id` and `package_file_map` preserve the
|
`company_skill_versions.package_snapshot_id` and `package_file_map` preserve the
|
||||||
public version file inventory without storing its contents again. Existing repository
|
public version file inventory without storing its contents again. Existing repository
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ locally authored/edited packages and unproven legacy packages keep a durable cop
|
|||||||
## Automatic upgrade
|
## Automatic upgrade
|
||||||
|
|
||||||
No data-migration command is required. The normal schema upgrade applies migration
|
No data-migration command is required. The normal schema upgrade applies migration
|
||||||
0402 (`0402_empty_overlord.sql`). External writes and automatic conversion are enabled by default. Startup
|
0403 (`0403_sad_captain_america.sql`). External writes and automatic conversion are enabled by default. Startup
|
||||||
restores pending work from indexed `migration_at` / `maintenance_at` columns. The
|
restores pending work from indexed `migration_at` / `maintenance_at` columns. The
|
||||||
shared delivery coordinator converts four snapshots and four versions per batch,
|
shared delivery coordinator converts four snapshots and four versions per batch,
|
||||||
reading one legacy body at a time. It verifies the hash, uploads, reads the objects
|
reading one legacy body at a time. It verifies the hash, uploads, reads the objects
|
||||||
|
|||||||
File renamed without changes.
+356
-3
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"id": "7f056258-4b1a-4828-b950-33f070fc0c47",
|
"id": "5e1d060c-9659-4a9a-afd8-7d7145b33da2",
|
||||||
"prevId": "c7947622-f079-44c9-a57a-5a11d1bec5e8",
|
"prevId": "6ce76555-38d9-4074-873f-db02c546e2c6",
|
||||||
"version": "7",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
@@ -9624,6 +9624,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {
|
"indexes": {
|
||||||
|
"chat_actions_continuation_work_idx": {
|
||||||
|
"name": "chat_actions_continuation_work_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "company_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"chat_actions\".\"kind\" = 'interaction_wakeup' AND \"chat_actions\".\"status\" IN ('issued', 'processing')",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
"chat_actions_confirmation_recovery_idx": {
|
"chat_actions_confirmation_recovery_idx": {
|
||||||
"name": "chat_actions_confirmation_recovery_idx",
|
"name": "chat_actions_confirmation_recovery_idx",
|
||||||
"columns": [
|
"columns": [
|
||||||
@@ -9666,6 +9688,54 @@
|
|||||||
"concurrently": false,
|
"concurrently": false,
|
||||||
"method": "btree",
|
"method": "btree",
|
||||||
"with": {}
|
"with": {}
|
||||||
|
},
|
||||||
|
"chat_actions_github_check_work_idx": {
|
||||||
|
"name": "chat_actions_github_check_work_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"chat_actions\".\"kind\" = 'github_review_check'\n and (\"chat_actions\".\"status\" = 'received' or (\"chat_actions\".\"status\" = 'failed' and \"chat_actions\".\"result\"->>'retryable' = 'true'))",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
|
"chat_actions_github_terminal_work_idx": {
|
||||||
|
"name": "chat_actions_github_terminal_work_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"chat_actions\".\"kind\" = 'github_response_comment'\n and \"chat_actions\".\"status\" = 'processed' and \"chat_actions\".\"delivery_id\" is not null\n and coalesce(\"chat_actions\".\"result\"->>'final', 'false') <> 'true'",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
|
"chat_actions_github_ack_work_idx": {
|
||||||
|
"name": "chat_actions_github_ack_work_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"chat_actions\".\"kind\" = 'github_response_comment'\n and \"chat_actions\".\"delivery_id\" is not null and coalesce(\"chat_actions\".\"result\"->>'final', 'false') <> 'true'\n and (\"chat_actions\".\"status\" = 'received' or (\"chat_actions\".\"status\" = 'failed' and \"chat_actions\".\"result\"->>'retryable' = 'true'))",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"foreignKeys": {
|
"foreignKeys": {
|
||||||
@@ -12093,6 +12163,40 @@
|
|||||||
"method": "btree",
|
"method": "btree",
|
||||||
"with": {}
|
"with": {}
|
||||||
},
|
},
|
||||||
|
"chat_publications_comment_destination_idx": {
|
||||||
|
"name": "chat_publications_comment_destination_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "company_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "comment_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "endpoint_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "conversation_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"chat_publications\".\"comment_id\" is not null",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
"chat_publications_idempotency_uq": {
|
"chat_publications_idempotency_uq": {
|
||||||
"name": "chat_publications_idempotency_uq",
|
"name": "chat_publications_idempotency_uq",
|
||||||
"columns": [
|
"columns": [
|
||||||
@@ -18854,7 +18958,46 @@
|
|||||||
"name": "file_inventory",
|
"name": "file_inventory",
|
||||||
"type": "jsonb",
|
"type": "jsonb",
|
||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": true
|
"notNull": true,
|
||||||
|
"default": "'[]'::jsonb"
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"name": "storage",
|
||||||
|
"type": "jsonb",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"upload": {
|
||||||
|
"name": "upload",
|
||||||
|
"type": "jsonb",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"restore": {
|
||||||
|
"name": "restore",
|
||||||
|
"type": "jsonb",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"migration_at": {
|
||||||
|
"name": "migration_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"maintenance_at": {
|
||||||
|
"name": "maintenance_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
|
"restore_retry_at": {
|
||||||
|
"name": "restore_retry_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
},
|
},
|
||||||
"created_at": {
|
"created_at": {
|
||||||
"name": "created_at",
|
"name": "created_at",
|
||||||
@@ -18885,6 +19028,38 @@
|
|||||||
"concurrently": false,
|
"concurrently": false,
|
||||||
"method": "btree",
|
"method": "btree",
|
||||||
"with": {}
|
"with": {}
|
||||||
|
},
|
||||||
|
"company_skill_snapshots_migration_idx": {
|
||||||
|
"name": "company_skill_snapshots_migration_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "migration_at",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"company_skill_repository_snapshots\".\"migration_at\" is not null",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
|
"company_skill_snapshots_maintenance_idx": {
|
||||||
|
"name": "company_skill_snapshots_maintenance_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "maintenance_at",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"company_skill_repository_snapshots\".\"maintenance_at\" is not null",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"foreignKeys": {
|
"foreignKeys": {
|
||||||
@@ -19774,6 +19949,25 @@
|
|||||||
"primaryKey": false,
|
"primaryKey": false,
|
||||||
"notNull": false
|
"notNull": false
|
||||||
},
|
},
|
||||||
|
"package_snapshot_id": {
|
||||||
|
"name": "package_snapshot_id",
|
||||||
|
"type": "uuid",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"package_file_map": {
|
||||||
|
"name": "package_file_map",
|
||||||
|
"type": "jsonb",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
|
"migration_at": {
|
||||||
|
"name": "migration_at",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": false,
|
||||||
|
"default": "now()"
|
||||||
|
},
|
||||||
"revision_number": {
|
"revision_number": {
|
||||||
"name": "revision_number",
|
"name": "revision_number",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -19832,6 +20026,52 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexes": {
|
"indexes": {
|
||||||
|
"company_skill_versions_migration_idx": {
|
||||||
|
"name": "company_skill_versions_migration_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "migration_at",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"company_skill_versions\".\"migration_at\" is not null",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
|
"company_skill_versions_package_snapshot_idx": {
|
||||||
|
"name": "company_skill_versions_package_snapshot_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "package_snapshot_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
|
"company_skill_versions_repository_snapshot_idx": {
|
||||||
|
"name": "company_skill_versions_repository_snapshot_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "repository_snapshot_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
"company_skill_versions_skill_revision_idx": {
|
"company_skill_versions_skill_revision_idx": {
|
||||||
"name": "company_skill_versions_skill_revision_idx",
|
"name": "company_skill_versions_skill_revision_idx",
|
||||||
"columns": [
|
"columns": [
|
||||||
@@ -19943,6 +20183,19 @@
|
|||||||
"onDelete": "restrict",
|
"onDelete": "restrict",
|
||||||
"onUpdate": "no action"
|
"onUpdate": "no action"
|
||||||
},
|
},
|
||||||
|
"company_skill_versions_package_snapshot_id_company_skill_repository_snapshots_id_fk": {
|
||||||
|
"name": "company_skill_versions_package_snapshot_id_company_skill_repository_snapshots_id_fk",
|
||||||
|
"tableFrom": "company_skill_versions",
|
||||||
|
"tableTo": "company_skill_repository_snapshots",
|
||||||
|
"columnsFrom": [
|
||||||
|
"package_snapshot_id"
|
||||||
|
],
|
||||||
|
"columnsTo": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"onDelete": "restrict",
|
||||||
|
"onUpdate": "no action"
|
||||||
|
},
|
||||||
"company_skill_versions_author_agent_id_agents_id_fk": {
|
"company_skill_versions_author_agent_id_agents_id_fk": {
|
||||||
"name": "company_skill_versions_author_agent_id_agents_id_fk",
|
"name": "company_skill_versions_author_agent_id_agents_id_fk",
|
||||||
"tableFrom": "company_skill_versions",
|
"tableFrom": "company_skill_versions",
|
||||||
@@ -20388,6 +20641,78 @@
|
|||||||
"checkConstraints": {},
|
"checkConstraints": {},
|
||||||
"isRLSEnabled": false
|
"isRLSEnabled": false
|
||||||
},
|
},
|
||||||
|
"public.skill_package_deletions": {
|
||||||
|
"name": "skill_package_deletions",
|
||||||
|
"schema": "",
|
||||||
|
"columns": {
|
||||||
|
"id": {
|
||||||
|
"name": "id",
|
||||||
|
"type": "uuid",
|
||||||
|
"primaryKey": true,
|
||||||
|
"notNull": true,
|
||||||
|
"default": "gen_random_uuid()"
|
||||||
|
},
|
||||||
|
"company_id": {
|
||||||
|
"name": "company_id",
|
||||||
|
"type": "uuid",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"name": "provider",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"archive_key": {
|
||||||
|
"name": "archive_key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"manifest_key": {
|
||||||
|
"name": "manifest_key",
|
||||||
|
"type": "text",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
},
|
||||||
|
"delete_after": {
|
||||||
|
"name": "delete_after",
|
||||||
|
"type": "timestamp with time zone",
|
||||||
|
"primaryKey": false,
|
||||||
|
"notNull": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexes": {
|
||||||
|
"skill_package_deletions_due_idx": {
|
||||||
|
"name": "skill_package_deletions_due_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "delete_after",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreignKeys": {},
|
||||||
|
"compositePrimaryKeys": {},
|
||||||
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"checkConstraints": {},
|
||||||
|
"isRLSEnabled": false
|
||||||
|
},
|
||||||
"public.company_transfer_runs": {
|
"public.company_transfer_runs": {
|
||||||
"name": "company_transfer_runs",
|
"name": "company_transfer_runs",
|
||||||
"schema": "",
|
"schema": "",
|
||||||
@@ -30538,6 +30863,34 @@
|
|||||||
"method": "btree",
|
"method": "btree",
|
||||||
"with": {}
|
"with": {}
|
||||||
},
|
},
|
||||||
|
"fast_response_requests_delivery_idx": {
|
||||||
|
"name": "fast_response_requests_delivery_idx",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"expression": "company_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "endpoint_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"expression": "delivery_id",
|
||||||
|
"isExpression": false,
|
||||||
|
"asc": true,
|
||||||
|
"nulls": "last"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isUnique": false,
|
||||||
|
"where": "\"fast_response_requests\".\"delivery_id\" is not null",
|
||||||
|
"concurrently": false,
|
||||||
|
"method": "btree",
|
||||||
|
"with": {}
|
||||||
|
},
|
||||||
"fast_response_requests_history_idx": {
|
"fast_response_requests_history_idx": {
|
||||||
"name": "fast_response_requests_history_idx",
|
"name": "fast_response_requests_history_idx",
|
||||||
"columns": [
|
"columns": [
|
||||||
+7
@@ -2808,6 +2808,13 @@
|
|||||||
"when": 1793223470886,
|
"when": 1793223470886,
|
||||||
"tag": "0402_ancient_malice",
|
"tag": "0402_ancient_malice",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 403,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1793225730258,
|
||||||
|
"tag": "0403_sad_captain_america",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user