Skip to content

Instantly share code, notes, and snippets.

@dchw
Created February 3, 2023 15:55
Show Gist options
  • Select an option

  • Save dchw/238904b34adc9459280c6ea2a4131d08 to your computer and use it in GitHub Desktop.

Select an option

Save dchw/238904b34adc9459280c6ea2a4131d08 to your computer and use it in GitHub Desktop.

Revisions

  1. dchw created this gist Feb 3, 2023.
    31 changes: 31 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    Table products {
    name product
    Indexes {
    (name) [pk]
    }
    }

    Table organizations {
    id uuid
    name text
    Indexes {
    (id) [pk]
    }
    }

    Table seats {
    org_id uuid
    product text
    count int
    Indexes {
    (org_id, product) [unique]
    }
    }

    Ref: seats.org_id > organizations.id
    Ref: seats.product > products.name

    enum product {
    satellites
    ci
    }