add scripts folder and rename sqlserver
This commit is contained in:
@@ -14,7 +14,7 @@ param appUserPassword string
|
||||
var defaultDatabaseName = 'Todo'
|
||||
var actualDatabaseName = !empty(databaseName) ? databaseName : defaultDatabaseName
|
||||
|
||||
module sqlServer1 '../core/database/sqlserver/sqlserver1.bicep' = {
|
||||
module sqlServer1 '../core/database/sqlserver/sqlserver-catalog.bicep' = {
|
||||
name: 'sqlServer01'
|
||||
params: {
|
||||
name: name
|
||||
|
||||
@@ -14,7 +14,7 @@ param appUserPassword string
|
||||
var defaultDatabaseName = 'Todo'
|
||||
var actualDatabaseName = !empty(databaseName) ? databaseName : defaultDatabaseName
|
||||
|
||||
module sqlServer2 '../core/database/sqlserver/sqlserver2.bicep' = {
|
||||
module sqlServer2 '../core/database/sqlserver/sqlserver-identity.bicep' = {
|
||||
name: 'sqlServer02'
|
||||
params: {
|
||||
name: name
|
||||
|
||||
9
scripts/setup-database.ps1
Normal file
9
scripts/setup-database.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
# Default to current directory
|
||||
$FOLDER_PATH = [string](Get-Location)
|
||||
|
||||
# Before setting up your database, make sure of two things:
|
||||
# 1. Ensure your connection strings in appsettings.json point to a local SQL Server instance.
|
||||
# 2. Ensure the tool EF was already installed.
|
||||
dotnet tool update --global dotnet-ef
|
||||
dotnet ef database update -c catalogcontext -p $FOLDER_PATH/src/Infrastructure/Infrastructure.csproj -s $FOLDER_PATH/src/Web/Web.csproj
|
||||
dotnet ef database update -c appidentitydbcontext -p $FOLDER_PATH/src/Infrastructure/Infrastructure.csproj -s $FOLDER_PATH/src/Web/Web.csproj
|
||||
12
scripts/setup-database.sh
Normal file
12
scripts/setup-database.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Default to current directory
|
||||
FOLDER_PATH=$(pwd)
|
||||
|
||||
|
||||
# Before setting up your database, make sure of two things:
|
||||
# 1. Ensure your connection strings in appsettings.json point to a local SQL Server instance.
|
||||
# 2. Ensure the tool EF was already installed.
|
||||
dotnet tool update --global dotnet-ef
|
||||
dotnet ef database update -c catalogcontext -p $FOLDER_PATH/src/Infrastructure/Infrastructure.csproj -s $FOLDER_PATH/src/Web/Web.csproj
|
||||
dotnet ef database update -c appidentitydbcontext -p $FOLDER_PATH/src/Infrastructure/Infrastructure.csproj -s $FOLDER_PATH/src/Web/Web.csproj
|
||||
Reference in New Issue
Block a user