-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from DRJTechnology/Development
Moving NLog changes to main
- Loading branch information
Showing
43 changed files
with
1,046 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/PropertyPortfolioManager.Database/.azuredatastudio/settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dataworkspace.excludedProjects": [ | ||
"PropertyPortfolioManager.Database.sqlproj" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 160 additions & 0 deletions
160
src/PropertyPortfolioManager.Database/PropertyPortfolioManager.Database.sqlproj_backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<?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> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<Name>PropertyPortfolioManager.Database</Name> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectVersion>4.1</ProjectVersion> | ||
<ProjectGuid>{05deb012-55a2-44c0-a464-637412f4d858}</ProjectGuid> | ||
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider</DSP> | ||
<OutputType>Database</OutputType> | ||
<RootPath> | ||
</RootPath> | ||
<RootNamespace>PropertyPortfolioManager.Database</RootNamespace> | ||
<AssemblyName>PropertyPortfolioManager.Database</AssemblyName> | ||
<ModelCollation>1033,CI</ModelCollation> | ||
<DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure> | ||
<DeployToDatabase>True</DeployToDatabase> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<TargetLanguage>CS</TargetLanguage> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<SqlServerVerification>False</SqlServerVerification> | ||
<IncludeCompositeObjects>True</IncludeCompositeObjects> | ||
<TargetDatabaseSet>True</TargetDatabaseSet> | ||
<DefaultCollation>Latin1_General_CI_AS</DefaultCollation> | ||
<DefaultFilegroup>PRIMARY</DefaultFilegroup> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<DefineDebug>false</DefineDebug> | ||
<DefineTrace>true</DefineTrace> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> | ||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<DefineDebug>true</DefineDebug> | ||
<DefineTrace>true</DefineTrace> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion> | ||
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found --> | ||
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists> | ||
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> | ||
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> | ||
<ItemGroup> | ||
<Folder Include="Properties" /> | ||
<Folder Include="Security\" /> | ||
<Folder Include="Stored Procedures" /> | ||
<Folder Include="Tables" /> | ||
<Folder Include="Tables\general" /> | ||
<Folder Include="Tables\profile" /> | ||
<Folder Include="Tables\property" /> | ||
<Folder Include="Scripts" /> | ||
<Folder Include="Stored Procedures\property" /> | ||
<Folder Include="Stored Procedures\profile" /> | ||
<Folder Include="Stored Procedures\general" /> | ||
<Folder Include="Tables\finance" /> | ||
<Folder Include="Stored Procedures\finance" /> | ||
<Folder Include="Snapshots" /> | ||
<Folder Include="Schemas" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Build Include="Security\db_executor.sql" /> | ||
<Build Include="Tables\general\Address.sql" /> | ||
<Build Include="Tables\profile\User.sql" /> | ||
<Build Include="Tables\property\Portfolio.sql" /> | ||
<Build Include="Tables\property\Unit.sql" /> | ||
<Build Include="Tables\property\UnitType.sql" /> | ||
<Build Include="Stored Procedures\property\Unit_Create.sql" /> | ||
<Build Include="Stored Procedures\property\Unit_GetAll.sql" /> | ||
<Build Include="Stored Procedures\property\Unit_GetById.sql" /> | ||
<Build Include="Stored Procedures\property\Unit_Update.sql" /> | ||
<Build Include="Stored Procedures\property\UnitType_GetAll.sql" /> | ||
<Build Include="Stored Procedures\property\UnitType_Update.sql" /> | ||
<Build Include="Stored Procedures\property\UnitType_Create.sql" /> | ||
<Build Include="Stored Procedures\property\UnitType_GetById.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_Initialise.sql" /> | ||
<Build Include="Tables\property\PortfolioUser.sql" /> | ||
<Build Include="Stored Procedures\profile\User_Create.sql" /> | ||
<Build Include="Stored Procedures\profile\User_GetByObjectIdentifier.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_AddUser.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_GetAll.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_Create.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_GetById.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_Update.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_GetByUserObjectIdentifier.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_SelectForUser.sql" /> | ||
<Build Include="Tables\general\ContactType.sql" /> | ||
<Build Include="Tables\general\Contact.sql" /> | ||
<Build Include="Stored Procedures\general\ContactType_Create.sql" /> | ||
<Build Include="Stored Procedures\general\ContactType_GetAll.sql" /> | ||
<Build Include="Stored Procedures\general\ContactType_GetById.sql" /> | ||
<Build Include="Stored Procedures\general\ContactType_Update.sql" /> | ||
<Build Include="Tables\general\ContactContactType.sql" /> | ||
<Build Include="Stored Procedures\general\Contact_Create.sql" /> | ||
<Build Include="Stored Procedures\general\Contact_GetAll.sql" /> | ||
<Build Include="Stored Procedures\general\Contact_GetById.sql" /> | ||
<Build Include="Stored Procedures\general\Contact_Update.sql" /> | ||
<Build Include="Stored Procedures\property\Portfolio_Delete.sql" /> | ||
<Build Include="Stored Procedures\general\ContactType_Delete.sql" /> | ||
<Build Include="Stored Procedures\property\UnitType_Delete.sql" /> | ||
<Build Include="Stored Procedures\property\Unit_Delete.sql" /> | ||
<Build Include="Tables\general\File.sql" /> | ||
<Build Include="Stored Procedures\general\GetFileIdFromItemId.sql" /> | ||
<Build Include="Tables\property\Tenancy.sql" /> | ||
<Build Include="Tables\property\TenancyType.sql" /> | ||
<Build Include="Stored Procedures\property\TenancyType_Create.sql" /> | ||
<Build Include="Stored Procedures\property\TenancyType_Delete.sql" /> | ||
<Build Include="Stored Procedures\property\TenancyType_GetAll.sql" /> | ||
<Build Include="Stored Procedures\property\TenancyType_GetById.sql" /> | ||
<Build Include="Stored Procedures\property\TenancyType_Update.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_Create.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_Delete.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_GetAll.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_GetById.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_Update.sql" /> | ||
<Build Include="Stored Procedures\general\Contact_GetAllWithType.sql" /> | ||
<Build Include="Tables\property\TenancyContact.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_RemoveContact.sql" /> | ||
<Build Include="Stored Procedures\property\Tenancy_AddContact.sql" /> | ||
<Build Include="Tables\finance\AccountType.sql" /> | ||
<Build Include="Tables\finance\Account.sql" /> | ||
<Build Include="Tables\finance\Transaction.sql" /> | ||
<Build Include="Stored Procedures\finance\Account_Create.sql" /> | ||
<Build Include="Stored Procedures\finance\Account_GetAll.sql" /> | ||
<Build Include="Stored Procedures\finance\Account_GetById.sql" /> | ||
<Build Include="Stored Procedures\finance\Account_Update.sql" /> | ||
<Build Include="Security\ppm-user.sql" /> | ||
<Build Include="Schemas\finance.sql" /> | ||
<Build Include="Schemas\general.sql" /> | ||
<Build Include="Schemas\profile.sql" /> | ||
<Build Include="Schemas\property.sql" /> | ||
<Build Include="Stored Procedures\finance\AccountType_GetAll.sql" /> | ||
<Build Include="Stored Procedures\finance\Account_Delete.sql" /> | ||
<Build Include="Tables\finance\TransactionType.sql" /> | ||
<Build Include="Tables\finance\TransactionDetail.sql" /> | ||
<Build Include="Stored Procedures\finance\TransactionDetail_Get.sql" /> | ||
<Build Include="Stored Procedures\finance\TransactionType_GetAll.sql" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="Scripts\InitialiseData.sql" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<RefactorLog Include="PropertyPortfolioManager.Database.refactorlog" /> | ||
</ItemGroup> | ||
</Project> |
12 changes: 8 additions & 4 deletions
12
src/PropertyPortfolioManager.Database/Security/db_executor.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
--CREATE ROLE [db_executor] | ||
-- AUTHORIZATION [dbo]; | ||
-- CREATE ROLE [db_executor] | ||
-- AUTHORIZATION [dbo]; | ||
-- GO | ||
|
||
--GO | ||
--ALTER ROLE [db_executor] ADD MEMBER [ppm-user]; | ||
-- ALTER ROLE [db_executor] ADD MEMBER [ppm-user]; | ||
-- GO | ||
|
||
-- ALTER ROLE [db_executor] ADD MEMBER [ppm-user-dev]; | ||
-- GO | ||
|
3 changes: 3 additions & 0 deletions
3
src/PropertyPortfolioManager.Database/Security/ppm-user-dev.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--CREATE USER [ppm-user-dev] FOR LOGIN [ppm-user-dev]; | ||
--GO | ||
|
35 changes: 35 additions & 0 deletions
35
src/PropertyPortfolioManager.Database/Stored Procedures/dbo/InsertAppLog.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CREATE procedure [dbo].[InsertAppLog] | ||
( | ||
@Addeddate datetime, | ||
@Level nvarchar(50), | ||
@Message nvarchar(max), | ||
@StackTrace nvarchar(max), | ||
@Logger nvarchar(255), | ||
@Exception nvarchar(max), | ||
@RequestUrl nvarchar(255), | ||
@RequestType nvarchar(10) | ||
) | ||
as | ||
|
||
INSERT INTO [dbo].[AppLog] | ||
([AddedDate] | ||
,[Level] | ||
,[Message] | ||
,[StackTrace] | ||
,[Logger] | ||
,[Exception] | ||
,[RequestUrl] | ||
,[RequestType]) | ||
VALUES | ||
( | ||
@Addeddate, | ||
@Level, | ||
@Message, | ||
@StackTrace, | ||
@Logger, | ||
@Exception, | ||
@RequestUrl, | ||
@RequestType | ||
) | ||
GO | ||
|
14 changes: 14 additions & 0 deletions
14
src/PropertyPortfolioManager.Database/Tables/dbo/AppLog.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE [dbo].[AppLog] ( | ||
[Id] INT IDENTITY (1, 1) NOT NULL, | ||
[AddedDate] DATETIME NOT NULL, | ||
[Level] NVARCHAR (10) NULL, | ||
[Message] NVARCHAR (MAX) NULL, | ||
[StackTrace] NVARCHAR (MAX) NULL, | ||
[Exception] NVARCHAR (MAX) NULL, | ||
[Logger] NVARCHAR (255) NULL, | ||
[RequestUrl] NVARCHAR (255) NULL, | ||
[RequestType] NVARCHAR (10) NULL, | ||
PRIMARY KEY CLUSTERED ([Id] ASC) | ||
); | ||
GO | ||
|
16 changes: 16 additions & 0 deletions
16
src/PropertyPortfolioManager.Database/Tables/dbo/CombinedAccounts.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE [dbo].[CombinedAccounts] ( | ||
[Date] DATE NOT NULL, | ||
[Transaction_ID] SMALLINT NOT NULL, | ||
[Ledger] NVARCHAR (250) NOT NULL, | ||
[Description] NVARCHAR (4000) NOT NULL, | ||
[Reference] NVARCHAR (250) NULL, | ||
[Property] NVARCHAR (250) NULL, | ||
[Room] NVARCHAR (1) NULL, | ||
[Debit] MONEY NULL, | ||
[Credit] MONEY NULL, | ||
[Balance] MONEY NOT NULL, | ||
[Original_Order] SMALLINT NOT NULL, | ||
[selected] NVARCHAR (1) NULL | ||
); | ||
GO | ||
|
Oops, something went wrong.