Skip to content

Conversation

oskardudycz
Copy link
Contributor

@oskardudycz oskardudycz commented Jul 12, 2024

Changed _id type to Text. In PostgreSQL, this should be almost equally the same indexable. Of course, it'll take a bit more storage, but let's live with that for now.

We can, in the future, allow, as Marten does, to use different definitions of collection tables.

Changing from uuid to text will allow more sophisticated key strategies.

Most importantly, it'll reuse the stream ID as a document ID for Emmett projections.

Besides that, I added columns for future concepts:

  • _version - for optimistic concurrency handling,
  • _partition - for built-in PostgreSQL partitioning,
  • _created, _modified - for timestamp metadata,
  • metadata - for technical additional data,
  • _archived - for soft deletion and also partitioning

@oskardudycz oskardudycz force-pushed the changed_primary_key_to_text branch 2 times, most recently from 4a9ed43 to a543c61 Compare July 12, 2024 15:35
Changed _id type to Text. In PostgreSQL this should be almost equally the same indexable. Of course it'll take a bit more storage, but let's live with that for now.

We can in the future allow as Marten does to use different definition of collection table.

Changing from uuid to text will allow more sophisticated key strategies.

Most importantly it'll reuse the stream id as document id for Emmett projections.

Besides that added columns for future concepts:
- _version - for optimistic concurrency handling,
- _partition - for built-in PostgreSQL partitioning,
- _created, _modified - for timestamp metadata,
- metadata - for technical additional data,
- _archived - for soft deletion and also partitioning
@oskardudycz oskardudycz force-pushed the changed_primary_key_to_text branch from a543c61 to 1214866 Compare July 12, 2024 15:36
@oskardudycz oskardudycz merged commit 37f4ae6 into main Jul 12, 2024
@oskardudycz oskardudycz deleted the changed_primary_key_to_text branch July 12, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant