I have an SQL database project in VisualStudio 2010 in source control with TFS 2010 with a few branches that each deploy to different servers depending on the configuration profile.
Using a sqlcmdvars file with the configuration profile appended in the filename (Debug.sqlcmdvars, etc..) for each configuration profile lets me specify the unique file path for a particular deployment environment by use of the reserved names Path1 and Path2 for the mdf file and the log file.
<?xml version="1.0" encoding="utf-8"?>
<SqlCommandVariables xmlns="urn:Microsoft.VisualStudio.Data.Schema.Package.SqlCmdVars">
<Version>1.0</Version>
<Properties>
<Property>
<PropertyName>Path1</PropertyName>
<PropertyValue>C:\SQLSERVER LOG\$(DatabaseName)\</PropertyValue>
</Property>
<Property>
<PropertyName>Path2</PropertyName>
<PropertyValue>C:\SQLSERVER DATA\$(DatabaseName)\</PropertyValue>
</Property>
</Properties>
</SqlCommandVariables>
Now I'm trying to add a custom FileStream file with an associated FileStream FileGroup
I have added an additional entry in sqlcmdvars files:
<Property>
<PropertyName>PathBlobStream</PropertyName>
<PropertyValue>C:\SQLSERVER DATA\$(DatabaseName)\BlobStream\</PropertyValue>
</Property>
But am not sure how to tell the database to use this over what the SchemaObjects\Database Level Objects\Storage\BlobStore.sqlfile.sql has declared:
ALTER DATABASE [$(DatabaseName)]
ADD FILE (NAME = [BlobStore], FILENAME = 'C:\SQLSERVER DATA\####\BlobStream') TO FILEGROUP [BlobStreamFileGroup];
How do you use the new entry in the sqlcmdvars to override the path for the new FileStream file?