Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Legacy SQL Server to FAKE 5 Module #2074

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Fake.sln
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.Vault", "src\app\
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Installer.Squirrel", "src\app\Fake.Installer.Squirrel\Fake.Installer.Squirrel.fsproj", "{3DEF2E95-4BF8-413F-930E-32103A39364A}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Sql.SqlServer", "src\app\Fake.Sql.SqlServer\Fake.Sql.SqlServer.fsproj", "{2EEAD673-45BE-4836-90B4-CF545877ACB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1070,6 +1072,18 @@ Global
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x64.Build.0 = Release|Any CPU
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x86.ActiveCfg = Release|Any CPU
{3DEF2E95-4BF8-413F-930E-32103A39364A}.Release|x86.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x64.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x64.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x86.ActiveCfg = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Debug|x86.Build.0 = Debug|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|Any CPU.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x64.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x64.Build.0 = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x86.ActiveCfg = Release|Any CPU
{2EEAD673-45BE-4836-90B4-CF545877ACB9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1151,6 +1165,7 @@ Global
{F1641150-B89D-40B7-A3BE-9DC357410FDA} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
{AAAF92C5-C40D-40B8-84BA-137DF0E98B56} = {901F162F-8925-4390-89C5-9EE2C343F744}
{3DEF2E95-4BF8-413F-930E-32103A39364A} = {901F162F-8925-4390-89C5-9EE2C343F744}
{2EEAD673-45BE-4836-90B4-CF545877ACB9} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {058A0C5E-2216-4306-8AFB-0AE28320C26A}
Expand Down
3 changes: 3 additions & 0 deletions help/literate/templates/template-project.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ <h3 class="muted">{project-name}</h3>
<li>
<a href="dacpac.html">SQL DACPAC support</a>
</li>
<li>
<a href="sqlserver.html">SQL Server support</a>
</li>
<li>
<a href="fluentmigrator.html">FluentMigrator support</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions help/markdown/help-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Here is the old sidebar:
* [Azure WebJobs support](azurewebjobs.html)
* [Azure Cloud Services support](azurecloudservices.html)
* [SQL DACPAC support](dacpac.html)
* [SQL Server support](sqlserver.html)
* [FluentMigrator support](fluentmigrator.html)
* [Android publisher](androidpublisher.html)
* [File Watcher](watch.html)
Expand Down
24 changes: 24 additions & 0 deletions help/markdown/sql-sqlserver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Interacting with SQL Server Databases

<div class="alert alert-info">
<h5>INFO</h5>
<p>This documentation is for FAKE version 5.0 or later. The old documentation can be found <a href="v4/fake-sql-sqlserver.html">here</a></p>
</div>

FAKE can be used to create, delete, and run scripts against a SQL Server database.

## Sample Usage

You need to have some edition of SQL Server installed on the machine running these tasks. Choose an edition from the [Microsoft SQL Server Downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads).

open Fake.Sql

Target.create "CreateIntegrationTestsDatabase" (fun _ ->
let connectionString = "Data Source=.;Initial Catalog=DATABASE_NAME;Integrated Security=True;"
SqlServer.dropAndCreateDatabase connectionString

let scripts = [ "path/to/create/tables.sql"; "path/to/seed/data.sql" ]
|> Seq.ofList

SqlServer.runScripts connectionString scripts
)
1 change: 1 addition & 0 deletions help/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
<a href="/apidocs/v5/index.html#Fake.Sql">Sql</a>
<ul>
<li><a href="/sql-dacpac.html">DacPac</a></li>
<li><a href="/sql-sqlserver.html">SQL Server</a></li>
</ul>
</li>
<li>
Expand Down
2 changes: 2 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,6 @@ group netcore
nuget System.IO.Compression.ZipFile
nuget System.Runtime.Loader
nuget System.IO.FileSystem.Watcher
nuget System.Data.SqlClient
nuget Microsoft.SqlServer.SqlManagementObjects

Loading