Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Add VS DB Project for database
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardvanRooijen committed Jul 3, 2011
1 parent ac34c74 commit 42d9446
Show file tree
Hide file tree
Showing 12 changed files with 295 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Name>CraftAndDesignCouncil.Data</Name>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.0</ProjectVersion>
<ProjectGuid>{67cbc824-a49e-4e9b-a947-360f3dfe65c3}</ProjectGuid>
<DSP>Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider</DSP>
<AppDesignerFolder>Properties</AppDesignerFolder>
<ShowWizard>False</ShowWizard>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
<IncludeSchemaNameInFileName>False</IncludeSchemaNameInFileName>
<ModelCollation>1033, CI</ModelCollation>
<DefaultFileStructure>BySchema</DefaultFileStructure>
<DeployToDatabaseAddToServerExplorer>True</DeployToDatabaseAddToServerExplorer>
<DeployToScript>True</DeployToScript>
<CatalogPropertiesFile>Properties\Database.sqlsettings</CatalogPropertiesFile>
<LoadSqlClrTypes>True</LoadSqlClrTypes>
<RootNamespace>CraftAndDesignCouncil.Data</RootNamespace>
<DefaultSchema>dbo</DefaultSchema>
<PreviousProjectVersion>4.0</PreviousProjectVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>.\sql\release\</OutputPath>
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
<TargetConnectionString>
</TargetConnectionString>
<TargetDatabase>
</TargetDatabase>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<SuppressWarnings>
</SuppressWarnings>
<DeploymentConfigFile>Properties\Database.sqldeployment</DeploymentConfigFile>
<SqlCommandVariablesFile>Properties\Database.sqlcmdvars</SqlCommandVariablesFile>
<DeployToDatabase>False</DeployToDatabase>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>.\sql\debug\</OutputPath>
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
<TargetConnectionString>Data Source=.\SQLExpress;Integrated Security=True;Pooling=False</TargetConnectionString>
<TargetDatabase>CADCAwardsProcess</TargetDatabase>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<SuppressWarnings>
</SuppressWarnings>
<DeploymentConfigFile>Properties\Database.sqldeployment</DeploymentConfigFile>
<SqlCommandVariablesFile>Properties\Database.sqlcmdvars</SqlCommandVariablesFile>
<DeployToDatabase>False</DeployToDatabase>
</PropertyGroup>
<!--Import the settings-->
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" />
<ItemGroup>
<Folder Include="Scripts" />
<Folder Include="Scripts\Pre-Deployment" />
<Folder Include="Scripts\Post-Deployment" />
<Folder Include="Data Generation Plans" />
<Folder Include="Schema Comparisons" />
<Folder Include="Properties\" />
<Folder Include="Schema Objects\" />
<Folder Include="Schema Objects\Schemas\" />
<Folder Include="Schema Objects\Schemas\dbo\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Defaults\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Functions\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Rules\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Stored Procedures\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Types\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Types\User Defined Data Types\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Types\User Defined Types CLR\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Types\User Defined Table Types\" />
<Folder Include="Schema Objects\Schemas\dbo\Programmability\Types\XML Schema Collections\" />
<Folder Include="Schema Objects\Schemas\dbo\Service Broker\" />
<Folder Include="Schema Objects\Schemas\dbo\Service Broker\Queues\" />
<Folder Include="Schema Objects\Schemas\dbo\Synonyms\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\Constraints\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\Indexes\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\Keys\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\Triggers\" />
<Folder Include="Schema Objects\Schemas\dbo\Tables\Statistics\" />
<Folder Include="Schema Objects\Schemas\dbo\Views\" />
<Folder Include="Schema Objects\Schemas\dbo\Views\Indexes\" />
<Folder Include="Schema Objects\Schemas\dbo\Views\Triggers\" />
<Folder Include="Schema Objects\Schemas\dbo\Views\Statistics\" />
<Folder Include="Schema Objects\Database Level Objects\" />
<Folder Include="Schema Objects\Database Level Objects\Assemblies\" />
<Folder Include="Schema Objects\Database Level Objects\Database Triggers\" />
<Folder Include="Schema Objects\Database Level Objects\Security\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Schemas\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Users\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Certificates\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Asymmetric Keys\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Master Keys\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Signatures\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Symmetric Keys\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Database Encryption Keys\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Database Audit Specification\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Roles\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Roles\Application Roles\" />
<Folder Include="Schema Objects\Database Level Objects\Security\Roles\Database Roles\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Broker Priorities\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Contracts\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Event Notifications\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Message Types\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Remote Service Binding\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Routes\" />
<Folder Include="Schema Objects\Database Level Objects\Service Broker\Services\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Full Text Stoplists\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Filegroups\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Files\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Full Text Catalogs\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Partition Functions\" />
<Folder Include="Schema Objects\Database Level Objects\Storage\Partition Schemes\" />
</ItemGroup>
<ItemGroup>
<PropertiesFile Include="Properties\Database.sqlsettings">
</PropertiesFile>
<PropertiesFile Include="Properties\Database.sqldeployment">
</PropertiesFile>
<PropertiesFile Include="Properties\Database.sqlcmdvars">
</PropertiesFile>
<Build Include="Properties\Database.sqlpermissions">
<ModelBuilderType>Permissions</ModelBuilderType>
</Build>
<PreDeploy Include="Scripts\Pre-Deployment\Script.PreDeployment.sql">
<SubType>Code</SubType>
</PreDeploy>
<PostDeploy Include="Scripts\Post-Deployment\Script.PostDeployment.sql">
<SubType>Code</SubType>
</PostDeploy>
</ItemGroup>
<ItemGroup>
<BuildContributorArgument Include="OutDir=$(OutDir)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<SqlCommandVariables xmlns="urn:Microsoft.VisualStudio.Data.Schema.Package.SqlCmdVars" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1.0</Version>
<Properties>
</Properties>
</SqlCommandVariables>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<DeploymentConfigurationSettings xmlns="urn:Microsoft.VisualStudio.Data.Schema.Package.DeploymentConfigurationSettings" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1.0</Version>
<Properties>
<AlwaysCreateNewDatabase>False</AlwaysCreateNewDatabase>
<BlockIncrementalDeploymentIfDataLoss>True</BlockIncrementalDeploymentIfDataLoss>
<DeployDatabaseProperties>True</DeployDatabaseProperties>
<DeploymentCollationPreference>UseSourceModelCollation</DeploymentCollationPreference>
<DoNotUseAlterAssemblyStatementsToUpdateCLRTypes>False</DoNotUseAlterAssemblyStatementsToUpdateCLRTypes>
<GenerateDropsIfNotInProject>False</GenerateDropsIfNotInProject>
<PerformDatabaseBackup>False</PerformDatabaseBackup>
<SingleUserMode>False</SingleUserMode>
</Properties>
</DeploymentConfigurationSettings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Permissions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:Microsoft.VisualStudio.Data.Schema.Permissions" Version="1.0">
<!-- The examples below are provided to illustrate how permissions
are defined in the project system for Databases, Objects,
and Columns.
GRANT Database Permissions
<PermissionStatement Action ="GRANT">
<Permission>CREATE TABLE</Permission>
<Grantee>User1</Grantee>
</PermissionStatement>
GRANT Object Permission
<PermissionStatement Action ="GRANT">
<Permission>SELECT</Permission>
<Grantee>User1</Grantee>
<Object Name ="Table1" Schema ="User1" Type ="OBJECT"/>
</PermissionStatement>
DENY Object Permission
<PermissionStatement Action ="DENY">
<Permission>DELETE</Permission>
<Grantee>User1</Grantee>
<Object Name ="Table1" Schema ="User1" Type ="OBJECT"/>
</PermissionStatement>
GRANT Object Column Permission
<PermissionStatement Action ="GRANT">
<Permission>SELECT</Permission>
<Grantee>User1</Grantee>
<Object Name ="Table1" Schema ="User1" Type ="OBJECT">
<Columns Treatment ="INCLUDE">
<Column Name="Col1"/>
<Column Name="Col2"/>
<Column Name="…"/>
</Columns>
</Object>
</PermissionStatement>
-->
</Permissions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<CatalogProperties xmlns="urn:Microsoft.VisualStudio.Data.Schema.Package.CatalogProperties" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1.0</Version>
<Properties>
<!--Sql Server 2000-->
<DefaultCollation>SQL_Latin1_General_CP1_CI_AS</DefaultCollation>
<AnsiNullDefault>True</AnsiNullDefault>
<AnsiNulls>True</AnsiNulls>
<AnsiPadding>True</AnsiPadding>
<AnsiWarnings>True</AnsiWarnings>
<ArithAbort>True</ArithAbort>
<ConcatNullYieldsNull>True</ConcatNullYieldsNull>
<QuotedIdentifier>True</QuotedIdentifier>
<NumericRoundAbort>False</NumericRoundAbort>
<RecursiveTriggersEnabled>False</RecursiveTriggersEnabled>
<DatabaseState>ONLINE</DatabaseState>
<UpdateOptions>READ_WRITE</UpdateOptions>
<CloseCursorOnCommitEnabled>False</CloseCursorOnCommitEnabled>
<DefaultCursor>LOCAL</DefaultCursor>
<AutoClose>False</AutoClose>
<AutoCreateStatistics>True</AutoCreateStatistics>
<AutoShrink>False</AutoShrink>
<AutoUpdateStatistics>True</AutoUpdateStatistics>
<TornPageDetection>False</TornPageDetection>
<DatabaseAccess>MULTI_USER</DatabaseAccess>
<Recovery>FULL</Recovery>
<EnableFullTextSearch>True</EnableFullTextSearch>
<DatabaseChaining>False</DatabaseChaining>
<DefaultFilegroup>PRIMARY</DefaultFilegroup>
<!--Sql Server 2005-->
<!--<CompatibilityMode></CompatibilityMode>-->
<Trustworthy>False</Trustworthy>
<AutoUpdateStatisticsAsynchronously>False</AutoUpdateStatisticsAsynchronously>
<PageVerify>NONE</PageVerify>
<ServiceBrokerOption>DisableBroker</ServiceBrokerOption>
<DateCorrelationOptimizationOn>False</DateCorrelationOptimizationOn>
<Parameterization>SIMPLE</Parameterization>
<AllowSnapshotIsolation>False</AllowSnapshotIsolation>
<ReadCommittedSnapshot>False</ReadCommittedSnapshot>
<VardecimalStorageFormatOn>True</VardecimalStorageFormatOn>
<SupplementalLoggingOn>False</SupplementalLoggingOn>
<!--Sql Server 2008-->
<DefaultFileStreamFilegroup></DefaultFileStreamFilegroup>
<IsChangeTrackingOn>False</IsChangeTrackingOn>
<IsChangeTrackingAutoCleanupOn>True</IsChangeTrackingAutoCleanupOn>
<ChangeTrackingRetentionPeriod>2</ChangeTrackingRetentionPeriod>
<ChangeTrackingRetentionUnit>Days</ChangeTrackingRetentionUnit>
<IsEncryptionOn>False</IsEncryptionOn>
<IsBrokerPriorityHonored>False</IsBrokerPriorityHonored>
</Properties>
</CatalogProperties>

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
Use SQLCMD syntax to reference a variable in the post-deployment script.
Example: :setvar TableName MyTable
SELECT * FROM [$(TableName)]
--------------------------------------------------------------------------------------
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Pre-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be executed before the build script.
Use SQLCMD syntax to include a file in the pre-deployment script.
Example: :r .\myfile.sql
Use SQLCMD syntax to reference a variable in the pre-deployment script.
Example: :setvar TableName MyTable
SELECT * FROM [$(TableName)]
--------------------------------------------------------------------------------------
*/
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.connection_string"></property>
<property name="connection.connection_string_name">Data</property>
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<configSections>
<section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" />
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
Expand All @@ -9,7 +10,11 @@
</sectionGroup>
</configSections>

<system.web.webPages.razor>
<connectionStrings>
<add name="Data" connectionString="Data Source=.\SQLExpress;Initial Catalog=CADCAwardsProcess;Integrated Security=True;Application Name=CADCAwardsProcess;" providerName="System.Data.SqlClient" />
</connectionStrings>

<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CraftAndDesignCouncil.Web.M
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CraftAndDesignCouncil.Tests", "CraftAndDesignCouncil.Tests\CraftAndDesignCouncil.Tests.csproj", "{CC4A233E-BE8A-47CC-A87C-8352BFD557B7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{06479610-E42C-4BE4-9D0D-8ED5F2CB95B4}"
EndProject
Project("{C8D11400-126E-41CD-887F-60BD40844F9E}") = "CraftAndDesignCouncil.Data", "CraftAndDesignCouncil.Data\CraftAndDesignCouncil.Data.dbproj", "{67CBC824-A49E-4E9B-A947-360F3DFE65C3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -53,6 +57,12 @@ Global
{CC4A233E-BE8A-47CC-A87C-8352BFD557B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC4A233E-BE8A-47CC-A87C-8352BFD557B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC4A233E-BE8A-47CC-A87C-8352BFD557B7}.Release|Any CPU.Build.0 = Release|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Release|Any CPU.Build.0 = Release|Any CPU
{67CBC824-A49E-4E9B-A947-360F3DFE65C3}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -64,5 +74,6 @@ Global
{39613BA0-1206-4A4B-A16A-C1F2A22D1267} = {D5E689AA-BE7E-4F5F-AF51-03F71C6C31B2}
{F63E0957-B60B-47A3-96BB-76DC243D0C8A} = {2322D330-1A60-4F79-B553-53DED803A098}
{CC4A233E-BE8A-47CC-A87C-8352BFD557B7} = {2322D330-1A60-4F79-B553-53DED803A098}
{67CBC824-A49E-4E9B-A947-360F3DFE65C3} = {06479610-E42C-4BE4-9D0D-8ED5F2CB95B4}
EndGlobalSection
EndGlobal

0 comments on commit 42d9446

Please sign in to comment.