Skip to content

Migrate persistence from pgo to kura#30

Merged
Taure merged 2 commits into
mainfrom
change-to-kura
Jun 24, 2026
Merged

Migrate persistence from pgo to kura#30
Taure merged 2 commits into
mainfrom
change-to-kura

Conversation

@Taure

@Taure Taure commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Replaces raw pgo queries with the kura data layer.

Changes

  • Schemas (src/schemas/): chat, message, chatli_user, device, participant, attachment, callback, li, ldf_message using kura_schema + #kura_field{}
  • Repo: new chatli_repo (kura_repo behaviour)
  • DB layer: chatli_db, chatli_user_db, chatli_device_db rewritten onto kura_query / kura_changeset / chatli_repo
  • Deps: pin kura v2.0.8 (includes jsonb string-scalar dump support, needed for text message payloads) and kura_postgres v0.4.2; added rebar3_kura plugin
  • Migrations: generated sql/10_ldf.sql, sql/20_chatli.sql
  • Config: switched to the kura postgres backend
  • Dev: docker-compose.yml for local Postgres; .gitignore covers _checkouts/, .claude/, *.crashdump

Verification

  • rebar3 compile - clean (against pinned kura v2.0.8, no _checkouts override)
  • rebar3 ct - all 12 tests pass against Docker Postgres (users, chats, participants, message send/filter/history, attachments, devices, callbacks)
  • jsonb message-payload round-trip verified end-to-end (quotes, emoji, backslash preserved)

Taure added 2 commits June 24, 2026 09:04
Replace raw pgo queries with the kura data layer:
- add kura schemas (chat, message, chatli_user, device, participant,
  attachment, callback, li, ldf_message) and chatli_repo (kura_repo)
- rewrite chatli_db, chatli_user_db, chatli_device_db onto
  kura_query/kura_changeset/chatli_repo
- pin kura v2.0.8 (jsonb string-scalar dump support) + kura_postgres v0.4.2,
  drop the local _checkouts override
- add generated sql migrations and a dev docker-compose for local Postgres
- switch config to the kura postgres backend
Unpinned rebar3_lint let CI fetch elvis_core 5.x, which rejects the
existing elvis.config format and broke linting. Pin to 4.2.2 so CI and
local agree. Also wrap an over-long kura_changeset:cast call in
chatli_db to satisfy the 120-char line_length rule.
@Taure
Taure merged commit ced8391 into main Jun 24, 2026
2 checks passed
@Taure
Taure deleted the change-to-kura branch June 24, 2026 07:44
Taure added a commit that referenced this pull request Jun 24, 2026
Start version-controlling CLAUDE.md so the project notes live with the
code (CLAUDE.md is no longer globally gitignored). Fix the stack line:
persistence is kura (kura_postgres backend), not pgo (removed in #30).
Taure added a commit that referenced this pull request Jun 24, 2026
Start version-controlling CLAUDE.md so the project notes live with the
code (CLAUDE.md is no longer globally gitignored). Fix the stack line:
persistence is kura (kura_postgres backend), not pgo (removed in #30).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant