Both MySQL and PostgreSQL have descriptions on tables and columns. SQL server implements these as extended properties. See http://technet.microsoft.com/en-us/library/ms190243(v=sql.105).aspx.

Comments

rob_johnston’s picture

StatusFileSize
new5.27 KB
rob_johnston’s picture

Status: Active » Needs review
rob_johnston’s picture

Making a note to myself... just got this message after running an update:

SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Property cannot be added. Property 'MS_Description' already exists for 'dbo.file_managed.filesize'.

I think it was from system module update 7079 - Convert the 'filesize' column in {file_managed} to a bigint.

rob_johnston’s picture

Status: Needs review » Needs work

Found the problem... the function changeField() makes a call to addField() so the call to createdDescriptionSql() at the end of the changeField() function can be removed. Also, this function should be named createDescriptionSql(). I will post a new patch in a few days.

rob_johnston’s picture

Status: Needs work » Needs review
StatusFileSize
new10.15 KB

  • f990e8c committed on 8.x-1.x
    Issue #2146347: Missing descriptions on tables and columns.
    
david_garcia’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

I added this to the D8 experimental version of the driver.

I had to fix a strange issue, and I am not happy in the way I have done it.

It looks like fn_listextendedproperty will not read any value until current transaction is commited. So, if during the same transactions you try to perform two operations on the same object you can end up doing two sp_addextendedproperty over the same object. The second time it will throw an exception.

I just added a static cache, but it is not a good solution...

david_garcia’s picture

Status: Needs review » Needs work

All this work got lost in the latest 7.x-2.x -> 8.x-1.0 port.

david_garcia’s picture

Version: 8.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Fixed

Fixed for D8!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.