drupflare/worker - v1.0.0
    Preparing search index...

    Function snapshotTables

    • Copies the bookkeeping tables, refusing rather than quietly spending the day.

      CREATE TABLE ... AS SELECT loses primary keys and indexes, which is fine because a snapshot table is only ever read back with SELECT * and restored INTO the original table, which keeps its own schema.

      The ceiling exists because rows written is the binding meter: at 100,000/day, a 20,000-row snapshot is a fifth of a day and anything larger is not a backup strategy, it is an outage. A table that is over the ceiling is NAMED in the refusal.

      Parameters

      Returns
          | {
              counts?: undefined;
              error: string;
              missing?: undefined;
              ok: boolean;
              rowsWritten?: undefined;
              statements?: undefined;
              total?: undefined;
          }
          | {
              counts: Record<string, number>;
              error: string;
              missing?: undefined;
              ok: boolean;
              rowsWritten?: undefined;
              statements?: undefined;
              total: number;
          }
          | {
              counts: Record<string, number>;
              error?: undefined;
              missing: string[];
              ok: boolean;
              rowsWritten: number;
              statements: number;
              total: number;
          }