Hey guys,
I design my SQL schemas in MySQL Workbench and I usually write a comment
to every field, so that other people know for what purpose a field exists and
how to use it. These comments are exportet within SQL and finally present in
the DB, phpMyAdmin for example displays the comments right next to the
field name.
Basically, Field Comments are that what in your schema-module is the description
field.
It is more that annoying to see hundreds of error lines on admin/build/schema/describe
just because no description is available.
My workflow is the following: export SQL from MySQL Workbench to the database,
go to admin/build/schema/inspect, copy the schema-arrays to my *.install files,
refresh modules.
So, I would suggest to read out the comment information during the inspect-step,
so that sql field comments are used for your schema description fields?
I think this feature would make work a lot easier, because the work hasn't to be done
twice.
Thanks in advance!
Comments
Comment #1
mikeryanA reasonable request, but not critical...
Comment #2
mikeryanI've committed this for MySQL - any Postgres users want to tackle schema_pgsql.inc?
Comment #3
deviantintegral commentedAs a result of this change, in 1.7, the description field is wrapped in t(), which is incorrect. As the database comment field is only modified at install time, it should always be in English.
Comment #4
cleaver commentedI think this is related to this issue...
The schema output from admin/build/schema/inspect wraps the description in the t() function... it should just be plain text according to Schema API examples in: http://drupal.org/node/146862
Comment #5
dave reid@deviantintegral @cleaver: This has already been fixed with #1223974: Schema descriptions should not be wrapped in t().
Comment #6
deviantintegral commentedExcellent.