dbsrgits / dbix-class-schema-loader

Official GitHub remote for git.shadowcat.co.uk DBIx-Class-Schema-Loader.git
http://dbix-class.org/
11 stars 34 forks source link

need POD table and column comments for more backends [rt.cpan.org #53855] #46

Open rabbiveesh opened 1 year ago

rabbiveesh commented 1 year ago

Migrated from rt.cpan.org#53855 (status was 'open')

Requestors:

From rmb32@cornell.edu on 2010-01-20 19:50:17 :

Need implementations of _table_comment and _column_comment for more
backends (oracle, db2, mssql...)

With extra tests covering them of course.

From justin.d.hunter@gmail.com on 2010-10-30 04:22:24 :

Oracle support added: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?
p=dbsrgits/DBIx-Class-Schema-
Loader.git;a=commitdiff;h=4cd5155bb0df2e2e59378d9e878af90285967e12

On Wed Jan 20 14:50:17 2010, rbuels wrote:
> Need implementations of _table_comment and _column_comment for more
> backends (oracle, db2, mssql...)
> 
> With extra tests covering them of course.
> 

From rkitover@cpan.org on 2012-09-09 16:26:32 :

An update on this ticket:

SineSwiper added support for the REMARKS field from $dbh->table_info and $dbh-
>column_info in _table_comment and _column_comment in ::DBI.

Someone else (I forget who) added better support for MySQL, even though MySQL's 
support for comments is very lacking.

There is also a generic mechanism available to store your comments in tables, a 
table_comments and column_comments tables (overridable via table_comments_table 
and column_comments_table attributes.)

What is left is to investigate and test comment support for other supported DBs.

From daxim@cpan.org on 2017-06-22 14:44:47 :

for MSSQL:

select t.name [Table], prop.value [TableComment]
from sys.tables t left join sys.extended_properties prop
on t.object_id = prop.major_id and prop.minor_id = 0 and prop.name = 'MS_Description'

select t.name [Table], c.name [Column], prop.value [ColumnComment]
from sys.tables t
inner join sys.columns c on t.object_id = c.object_id
left join sys.extended_properties prop
on t.object_id = prop.major_id and c.column_id = prop.minor_id and prop.name = 'MS_Description'