Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a new schema in a Visual Studio 2013 Database Project

I need to create an additional schema with some database objects in it within a Visual Studio 2013 Database Project. How can I do this?

like image 228
Metaphor Avatar asked Dec 15 '22 16:12

Metaphor


1 Answers

Add a new item to your project of type Schema (listed under SQL Server > Security).

For the objects that belong to this schema, add them as you normally would to your project. However they will default to the dbo schema so you will have to change that in each object's script (for example, CREATE TABLE dbo.Table1 becomes CREATE TABLE Schema1.Table1)

like image 56
Keith Avatar answered Dec 28 '22 08:12

Keith