From 9fa03f79c05f92ff903aa9a0eb43bf11b89f1cb9 Mon Sep 17 00:00:00 2001 From: Maurice Morfaw Date: Thu, 22 Oct 2026 10:05:39 +1100 Subject: [PATCH] Note the restart a component needs after drop_database or drop_table A component keeps the table class it registered at load time, so after a drop its endpoints answer 404 until Harper restarts and the component reloads. Co-Authored-By: Claude Opus 5.5 --- reference/operations-api/operations.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reference/operations-api/operations.md b/reference/operations-api/operations.md index 21815c98a..473eb7dc9 100644 --- a/reference/operations-api/operations.md +++ b/reference/operations-api/operations.md @@ -122,6 +122,10 @@ Drops a database and all its tables/records. Supports `"replicated": true` to pr { "operation": "drop_database", "database": "dev" } ``` +:::warning +If a component uses the dropped database, restart Harper afterwards so the component reloads against the change. Use `{ "operation": "restart" }` on a single node, or a [rolling restart](#restart_service) on a cluster, so nodes restart one at a time and the cluster keeps serving. Use `"replicated": true` to drop it on every node. +::: + ### `create_table` Creates a new table. Optional fields: `database` (defaults to `data`), `attributes` (array defining schema), `expiration` (TTL in seconds). @@ -143,6 +147,10 @@ Drops a table and all associated records. Supports `"replicated": true`. { "operation": "drop_table", "database": "dev", "table": "dog" } ``` +:::warning +If a component uses the dropped table, restart Harper afterwards so the component reloads against the change. Use `{ "operation": "restart" }` on a single node, or a [rolling restart](#restart_service) on a cluster, so nodes restart one at a time and the cluster keeps serving. Use `"replicated": true` to drop it on every node. +::: + ### `create_attribute` Creates a new attribute within a table. Harper auto-creates attributes on insert/update, but this can be used to pre-define them (e.g., for role-based permission setup).