Skip to content

feat: support OrmarConfig(comment=...) for table comments#1700

Merged
collerek merged 2 commits into
masterfrom
feat/issue-1240-table-comment
May 28, 2026
Merged

feat: support OrmarConfig(comment=...) for table comments#1700
collerek merged 2 commits into
masterfrom
feat/issue-1240-table-comment

Conversation

@collerek
Copy link
Copy Markdown
Collaborator

Adds comment= to OrmarConfig (and OrmarConfig.copy()) so models can declare a SQL COMMENT ON TABLE value. The comment is forwarded to the underlying SQLAlchemy Table and emitted by metadata.create_all() on PostgreSQL and MySQL; SQLite ignores it.

copy() inherits the parent's comment by default — pass comment=None to clear it or a new string to override, mirroring the existing schema semantics.

Closes #1240

collerek added 2 commits May 28, 2026 17:02
Forwarded to the underlying sqlalchemy.Table and emitted by
metadata.create_all() on PostgreSQL and MySQL (SQLite ignores it).
copy() inherits the parent comment by default; pass comment=None
explicitly to clear it.

Closes #1240
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 28, 2026

Merging this PR will degrade performance by 10.02%

❌ 1 (👁 1) regressed benchmark
✅ 97 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
👁 WallTime test_select_related_nested_merge[5-5] 29.9 ms 33.3 ms -10.02%

Comparing feat/issue-1240-table-comment (b8886bf) with master (1271803)

Open in CodSpeed

@collerek collerek merged commit e6f68fb into master May 28, 2026
11 checks passed
@collerek collerek deleted the feat/issue-1240-table-comment branch May 28, 2026 15:33
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.

Support specifying a table comment

1 participant