BUG: Certain extended properties won't add
These were all from one table and were added to ScriptsIgnoredOnImport.sql
EXEC sp_addextendedproperty N'MS_Description', N'Instructor Created Homework Assignments', 'SCHEMA', N'dbo', 'TABLE', N'homework', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'user_id of creator', 'SCHEMA', N'dbo', 'TABLE', N'homework', 'COLUMN', N'creator'
GO
EXEC sp_addextendedproperty N'MS_Description', N'0 - type A 2 - type B 3 - type C 4 - External', 'SCHEMA', N'dbo', 'TABLE', N'homework', 'COLUMN', N'homeworkformat'
GO
EXEC sp_addextendedproperty N'MS_Description', N'0 - type A 1 - type B 3 - type C 4 - type D 5 - Unknown', 'SCHEMA', N'dbo', 'TABLE', N'homework', 'COLUMN', N'exerciseformat'
Nothing about them stands out that I can see and I have a lot of extended properties already in there.
[902 byte] By [
Sideout] at [2007-12-31]
I created a table on an empty DB with following script, and added your extended properties to that table. Then I did importing schema, all those extended properties show up in homework table script. I tried with case sensitive and case insensitive databases, they all worked.
After importing the schema, is the script file for homework table there in the project? And are those three columns there in the script?
CREATE TABLE [homework]
(
creator nvarchar(50) not null,
homeworkformat nvarchar(20),
exerciseformat nvarchar(30)
)
Hi, we tried the script you emailed to Gert. But we can not repro the issue you mentioned. The extended property gets imported together with the Table script after invoking "Import Script" on a project. We also tried run the script in a database, and import schema from that database to a new project, those extended property still get imported together with the Table.
How you tried to create a new project, and import the script? What happened after that?
Thanks,
Liangxiao
Liangxiao Zhu - MSFT wrote: |
Hi, we tried the script you emailed to Gert. But we can not repro the issue you mentioned. The extended property gets imported together with the Table script after invoking "Import Script" on a project. We also tried run the script in a database, and import schema from that database to a new project, those extended property still get imported together with the Table. How you tried to create a new project, and import the script? What happened after that? Thanks, Liangxiao |
|
I am not a SideOut but we are having exactly the same issue. The extended properties are not imported to the project properly. We tried doing both Write Updates after schema compare and Import Script and in both cases the extended properties are included in the ScriptsIgnoredOnImport.sql. During the Import Script it even shows the warning that some statements were not loaded. I did try to create a new project and performed a schema import and it worked properly, so the bug is not happening when you do import schema but will be a problem if you have tables in the project but script will add extended properties on that table.
It is my speculation but I would guess that Visual Studio can't figure out in which source file the extended properties should go during import script and it is not a problem during schema import since the source files for tables are being generated and all information for each table is collected together.