Skip to content

Align dbscripts directory names with database names using underscores - #4164

Merged
rajithacharith merged 1 commit into
thunder-id:releasefrom
indeewari:fix/4120-dbscripts-underscore
Jul 20, 2026
Merged

Align dbscripts directory names with database names using underscores#4164
rajithacharith merged 1 commit into
thunder-id:releasefrom
indeewari:fix/4120-dbscripts-underscore

Conversation

@indeewari

@indeewari indeewari commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Purpose

The backend/dbscripts/ schema directories used kebab-case names (runtime-transient, runtime-persistent) while the Postgres database names and the config keys use underscores (runtime_transient, runtime_persistent).
Because the two forms differed, the Helm quickstart schema-apply loop, which reuses the database name as the directory path, resolved dbscripts/runtime_transient/ which does not exist. The failure was silent: cat errored to stderr while psql exited 0 on empty input, so the two runtime databases were left with zero tables and no error was reported.

This aligns the physical artifact names to underscores so the directory name equals the database name and the config key for all four databases, removing the mismatch at its source. Documentation references are updated in the same PR.


⚠️ Breaking Changes

🔧 Summary of Breaking Changes

The two runtime dbscripts/ directories and their SQLite files are renamed:

  • dbscripts/runtime-transient/ to dbscripts/runtime_transient/
  • dbscripts/runtime-persistent/ to dbscripts/runtime_persistent/
  • SQLite files runtime-transient.db / runtime-persistent.db to
    runtime_transient.db / runtime_persistent.db

Postgres database names and config keys are unchanged (already underscore).

💥 Impact

Existing SQLite deployments that use the default paths database/runtime-transient.db and database/runtime-persistent.db will, after this change, look for the underscore file names and create fresh empty databases if the old files are not renamed. Anyone applying schemas from an old dbscripts/ checkout by the kebab directory name must use the underscore names.

🔄 Migration Guide

For SQLite, rename the existing data files to runtime_transient.db and runtime_persistent.db, or point the configured paths at the old files. Postgres deployments need no change; the database names were already runtime_transient and runtime_persistent.

Related Issues

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided.
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Existing suites updated and validated)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

The dbscripts schema directories used kebab-case (runtime-transient,
runtime-persistent) while the Postgres database names and config keys use
underscores (runtime_transient, runtime_persistent). Because the two forms
differed, the Helm quickstart schema-apply loop resolved directory paths that
do not exist and silently left those two databases empty.

Rename the two dbscripts directories and their SQLite files to underscores so
the directory name matches the database name and config key for all four
databases, and update every reference: build scripts, integration test config,
Helm and OpenChoreo charts, the local-development compose source paths, the
integration-test CI action, and the documentation (developer docs, deployment
guides, Helm and OpenChoreo READMEs, the db skill guide, and the architecture
overview).

Kubernetes Secret data keys, the container-internal compose mount aliases, and
prose references to the databases keep their kebab-case names, as those belong
to separate naming domains.

Fixes thunder-id#4120
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2966ca6a-8967-40b9-b290-ded7beba8ec6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@indeewari indeewari self-assigned this Jul 20, 2026
@rajithacharith
rajithacharith enabled auto-merge July 20, 2026 10:12
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rajithacharith
rajithacharith merged commit 70f2972 into thunder-id:release Jul 20, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants