sql2dbml fail to generate note if dbo specified
メンテナーはふだん 1 日以内に返信
@huydo862003 がすでに取り組んでいます。
2025年11月6日 から。
評価
この issue はまだ評価されていません。
説明
Hi,
When you explicitly specify the dbo schema in front of the table, if comments are added to a column with EXEC sp_addextendedproperty (by specifying the dbo schema), these will not appear in the "note" of the columns concerned in the generated dbml via sql2dbml
Let's take the DDL noschema_specified_is_OK.sql
>>> cat ok.sql
CREATE TABLE mytable(
a int
)
GO
EXEC sp_addextendedproperty
@name = N'Column_Description',
@value = 'This is the description of my column',
@level0type = N'Schema', @level0name = 'dbo',
@level1type = N'Table', @level1name = 'mytable',
@level2type = N'Column', @level2name = 'a'
GO
>>> sql2dbml --mssql noschema_specified_is_OK.sql
Table "mytable" {
"a" int [note: 'This is the description of my column']
}
All is fine here.
Now try with specified_schema_is_OK.sql
>>> cat specified_schema_is_OK.sql
CREATE TABLE myschema.mytable(
a int
)
GO
EXEC sp_addextendedproperty
@name = N'Column_Description',
@value = 'This is the description of my column',
@level0type = N'Schema', @level0name = 'myschema',
@level1type = N'Table', @level1name = 'mytable',
@level2type = N'Column', @level2name = 'a'
GO
>>> sql2dbml --mssql specified_schema_is_OK.sql
Table "myschema"."mytable" {
"a" int [note: 'This is the description of my column']
}
All is fine here.
Now try with replacing myschema by dbo in file specified_dbo_is_NOK.sql
>>> cat specified_dbo_is_NOK.sql
CREATE TABLE dbo.mytable(
a int
)
GO
EXEC sp_addextendedproperty
@name = N'Column_Description',
@value = 'This is the description of my column',
@level0type = N'Schema', @level0name = 'dbo',
@level1type = N'Table', @level1name = 'mytable',
@level2type = N'Column', @level2name = 'a'
GO
>>> sql2dbml --mssql specified_dbo_is_NOK.sql
Table "dbo"."mytable" {
"a" int
}
In this case, there is a problem, the note corresponding to column's a comment doesn't appears
>>>sql2dbml --version
3.0.0
- 主要言語
- JavaScript
- スター
- 3.7k
- フォーク
- 233
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 23
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
holistics/dbml のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
@dbml/core 12.0.0 Postgres importer: timestamptz becomes timestamp, schema-qualified type doubled, Ref with ?<? rejected by parser対応中かも @zzoraemon043 が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
holistics/dbml#884 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
holistics/dbml#880 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
holistics/dbml#868 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mailcow/mailcow-dockerized#7677 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gcivil-nyu-org/team5-mon-fall26#145 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
needs discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openfga/openfga.dev#1436 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信