Skip to content

Tables are real Postgres tables, additive-only on publish #166

Closed

Description

@allisonmahmood

Question

What is a patch's table? (a) A schema-checked document store, Convex-style, one JSONB rows table partitioned by company, patch and table, no DDL ever. (b) Real Postgres tables in the company's database, invisible to the patch, DDL diffed on publish. The SDK reads the same either way. (a) looks simpler; (b) gives indexes, uniqueness and real joins, which the "extend another patch's table" story needs, and matches Allison's mental model that primitives add tables to the company's database. Consequence either way: an old browser tab stays open across a publish that changes the schema.

Activity

  1. added
    wayfinder:grilling
    on Sep 6, 2026
  2. allisonmahmood commented on Sep 6, 2026

    @allisonmahmood
    OwnerAuthor

    Resolved 2026-09-06 with Allison. (b), real tables. Astra's argument settled it: JSONB hides schema evolution rather than removing it (required fields, type changes, indexes and uniqueness remain problems), and a useful filter API needs an indexing model anyway. Schema changes are additive-only in v1: publish may add tables, add optional or defaulted columns, and add indexes; it refuses renames, type changes and drops until migrations are designed. That keeps an old open tab working, because nothing it relies on can vanish. The rule must cover old writers as well as existing rows (an old bundle must still be able to insert). The SDK stays much smaller than Postgres: typed table definitions, explicit indexes, bounded reads and mutations. The file store is a separate primitive, not rows in a table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:grilling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions