Skip to content

Commit d9791fb

Browse files
Merge pull request #365 from cmeeren/patch-2
Fix typo and formatting in dynamic DB docs. Thanks @cmeeren.
2 parents c8148eb + 22f89fb commit d9791fb

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

docs/content/dynamic local db.fsx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ MDF file for compile time?
3030
Well the following scripts can do that for your project.
3131
3232
First create a file called `createDb.ps1` and place it in an `SQL` subfolder in
33-
your project (you can place it in the project root to, if you want):
33+
your project (you can place it in the project root too, if you want):
3434
3535
param(
3636
[Parameter(Mandatory=$true)][String]$DbName,
@@ -115,26 +115,28 @@ static type checking without the hassle of having to have an internet
115115
connection, or deal with binary .MDF files!
116116
117117
Furthermore, the `.fsproj` edits above give the following benefits:
118-
* The DBs are rebuilt if their corresponding SQL scripts have changed, or if the
119-
PowerShell script has changed
120-
* The project is rebuilt if the PowerShell script has changed
121-
* The project is rebuilt if any SQL file has changed (both the database creation
122-
scripts, and any other SQL scripts that SqlClient might use though the
123-
`SqlFile` type provider)
124-
* Incremental build - each database is only built if its corresponding SQL
125-
script or the PowerShell script has changed
118+
119+
* The DBs are rebuilt if their corresponding SQL scripts have changed, or if the
120+
PowerShell script has changed
121+
* The project is rebuilt if the PowerShell script has changed
122+
* The project is rebuilt if any SQL file has changed (both the database creation
123+
scripts, and any other SQL scripts that SqlClient might use though the
124+
`SqlFile` type provider)
125+
* Incremental build - each database is only built if its corresponding SQL
126+
script or the PowerShell script has changed
126127
127128
When it comes to actually making the database creation scripts (such as the
128129
`create_myDb1.sql` in the example above), you can do this if you use SQL Server
129130
Management Studio (SSMS):
130-
* Connect to the database you want to copy
131-
* Right-click the database and select Tasks -> Generate scripts
132-
* Select what you need to be exported (for example, everything except Users).
133-
* If SqlClient throws errors when connecting to your local database, you might
134-
be missing important objects from your database. Make sure everything you need
135-
is enabled in SSMS under Tools -> Options -> SQL Server Object Explorer ->
136-
Scripting. For example, if you have indexed views and use the `WITH
137-
(NOEXPAND)` hint in your SQL, you need the indexes too, which are not enabled
138-
by default. In this case, enable "Script indexes" under the "Table and view
139-
options" heading.
131+
132+
* Connect to the database you want to copy
133+
* Right-click the database and select Tasks -> Generate scripts
134+
* Select what you need to be exported (for example, everything except Users).
135+
* If SqlClient throws errors when connecting to your local database, you might
136+
be missing important objects from your database. Make sure everything you need
137+
is enabled in SSMS under Tools -> Options -> SQL Server Object Explorer ->
138+
Scripting. For example, if you have indexed views and use the `WITH
139+
(NOEXPAND)` hint in your SQL, you need the indexes too, which are not enabled
140+
by default. In this case, enable "Script indexes" under the "Table and view
141+
options" heading.
140142
*)

0 commit comments

Comments
 (0)