Skip to content

Commit

Permalink
Merge pull request #24 from m-riley04/T-18
Browse files Browse the repository at this point in the history
T-18 Create database tables
  • Loading branch information
m-riley04 authored Aug 27, 2024
2 parents c96ddc6 + 408e135 commit dce9b19
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 0 deletions.
13 changes: 13 additions & 0 deletions TWIST.Server/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.8",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}
82 changes: 82 additions & 0 deletions TWIST.Server/Properties/ServiceDependencies/local/mssql1.arm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceGroupName": {
"type": "string",
"defaultValue": "TWIST-Resource-Group",
"metadata": {
"_parameterType": "resourceGroup",
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
}
},
"resourceGroupLocation": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource group. Resource groups could have different location than resources."
}
},
"resourceLocation": {
"type": "string",
"defaultValue": "[parameters('resourceGroupLocation')]",
"metadata": {
"_parameterType": "location",
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
}
}
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"name": "[parameters('resourceGroupName')]",
"location": "[parameters('resourceGroupLocation')]",
"apiVersion": "2019-10-01"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('TWIST-DB', subscription().subscriptionId)))]",
"resourceGroup": "[parameters('resourceGroupName')]",
"apiVersion": "2019-10-01",
"dependsOn": [
"[parameters('resourceGroupName')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"kind": "v12.0",
"location": "[parameters('resourceLocation')]",
"name": "twist",
"type": "Microsoft.Sql/servers",
"apiVersion": "2017-10-01-preview"
},
{
"sku": {
"name": "GP_S_Gen5",
"tier": "GeneralPurpose",
"family": "Gen5",
"capacity": 2
},
"kind": "v12.0,user,vcore,serverless",
"location": "[parameters('resourceLocation')]",
"name": "twist/TWIST-DB",
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2017-10-01-preview",
"dependsOn": [
"twist"
]
}
]
}
}
}
],
"metadata": {
"_dependencyType": "mssql.azure"
}
}
9 changes: 9 additions & 0 deletions TWIST.Server/Properties/serviceDependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"mssql1": {
"type": "mssql",
"connectionId": "TwistConnectionString",
"dynamicId": null
}
}
}
12 changes: 12 additions & 0 deletions TWIST.Server/Properties/serviceDependencies.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"dependencies": {
"mssql1": {
"serviceConnectorResourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.ServiceLinker/locations/eastus/connectors/TwistConnectionString_9C432B9E2C",
"secretStore": "LocalSecretsFile",
"resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Sql/servers/twist/databases/TWIST-DB",
"type": "mssql.azure",
"connectionId": "TwistConnectionString",
"dynamicId": null
}
}
}
5 changes: 5 additions & 0 deletions TWIST.Server/TWISTServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<PackageReference Include="Microsoft.AspNetCore.SpaProxy">
<Version>8.*-*</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
</ItemGroup>
Expand Down

0 comments on commit dce9b19

Please sign in to comment.