Skip to content

Add foreign key script and Colab setup notebook#22

Merged
sudoghut merged 1 commit into
masterfrom
add-fk-and-setup-notebook
May 19, 2026
Merged

Add foreign key script and Colab setup notebook#22
sudoghut merged 1 commit into
masterfrom
add-fk-and-setup-notebook

Conversation

@sudoghut
Copy link
Copy Markdown
Member

@sudoghut sudoghut commented May 19, 2026

Summary

  • scripts/add_foreign_keys.py: fetches foreign_keys_regen.csv from GitHub, deduplicates FK definitions, and recreates SQLite tables with proper FOREIGN KEY constraints (idempotent; 36 tables on current release)
  • scripts/setup_cbdb.ipynb: Colab-ready notebook — clones this repo then runs: download DB → add FKs → create views → build ADDRESSES table → download result; each step toggled by a boolean flag in the config cell
  • Docs (README.md, scripts/README.md, scripts/README.zh.md): updated EN + ZH to document new scripts

Test plan

  • add_foreign_keys.py tested locally against latest release: 36 tables updated, idempotent on second run
  • Full Colab notebook run (requires merge — create_views.sh needs Linux)

🤖 Generated with Claude Code

- scripts/add_foreign_keys.py: fetches foreign_keys_regen.csv from GitHub,
  deduplicates FK definitions, and recreates SQLite tables with proper
  FOREIGN KEY constraints (idempotent)
- scripts/setup_cbdb.ipynb: Colab-ready notebook that clones the repo then
  runs download → add FKs → create views → create ADDRESSES → download result,
  each step controlled by a boolean flag in the configuration cell
- README.md, scripts/README.md, scripts/README.zh.md: updated docs (EN + ZH)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sudoghut sudoghut merged commit fa26f6f into master May 19, 2026
2 checks passed
@sudoghut sudoghut deleted the add-fk-and-setup-notebook branch May 19, 2026 07:13
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