After converting VS 2010 DB projects to SSDT (SQL Server Data Tools) projects
(and a few comparisons with databases and between SSDT projects) I received the following folder structure:
If seems some of the tables and views are under Project\Schema Objects\Schemas\dbo
and some are under Project\dbo
.
The actual question(s):
Why are there two different folders?
(I suspect the import has something to do with this.)
Can I unite the files under one folder and if so which?
If not, to which folder to I add new files?
If I selected the create backup during the import, where is the backup information saved? - I want to be able to delete it.
Edit:
Another inconsistency - files under Project\dbo\Tables
contain keys and constraints, whereas files under Project\Schema Objects\Schemas\dbo\Tables
are split (tables separately, constraints separately and etc.)
It seems like the imported files (from VS 2010 dbproj) are under Project\Schema Objects\Schemas\dbo\Tables
whereas everything added after that is under Project\dbo\Tables
.
The new definitions are not split into different files and folders (tables, indexes, keys, ...) which makes the file system path less deep and reading all the information regarding a specific tables easier (especially if keys/indexes/constraints are deleted and then you compare with an older version of the table's file).
Moving the tables into Project\dbo\Tables
and moving the contents of the satellite files into the main file seems to work (you'll have to add "GO"s between the commands in the file).
Another option is to create a database from the sqlproj (by comparing database to project), delete the old files and then recreate them in the new format by comparing project to database.