[성현모] VPKI_DataDB DB프로젝트 추가, DB스크립트 추가

This commit is contained in:
SHM
2025-08-05 10:14:25 +09:00
parent 721fa6e29b
commit ca0fa3d2a4
24 changed files with 835 additions and 0 deletions

View File

@ -0,0 +1,78 @@
<?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>SystemX.DB.VPKI_DataDB</Name>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{5d374f06-d9fa-4159-bc84-1f3ca506f50e}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
<RootNamespace>SystemX.DB.VPKI_DataDB</RootNamespace>
<AssemblyName>SystemX.DB.VPKI_DataDB</AssemblyName>
<ModelCollation>1042,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>
<GenerateCreateScript>True</GenerateCreateScript>
<DefaultCollation>Korean_Wansung_CI_AS</DefaultCollation>
</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>true</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="dbo" />
<Folder Include="dbo\Functions" />
<Folder Include="dbo\Scripts" />
<Folder Include="dbo\StoredProcedures" />
<Folder Include="dbo\Tables" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Tables\tCertificate.sql" />
<Build Include="dbo\Tables\tOcsp.sql" />
<Build Include="dbo\Tables\tTbscsr.sql" />
<Build Include="dbo\Tables\tVerifyResult.sql" />
</ItemGroup>
<PropertyGroup>
<PostBuildEvent>xcopy /y $(ProjectDir)$(OutputPath)$(TargetName)_Create.sql $(SolutionDir)..\..\DBPatch\sqlScripts\
xcopy /y $(ProjectDir)$(OutputPath)$(TargetName).dacpac $(SolutionDir)..\..\DBPatch\sqlScripts\dacpac\</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,15 @@
CREATE TABLE [dbo].[tCertificate]
(
[cCuid] BIGINT NOT NULL PRIMARY KEY,
[cCsrsignature] NVARCHAR(1024) NOT NULL,
[cTierCode]NVARCHAR(20) NOT NULL,
[cUnitCode]NVARCHAR(20) NOT NULL,
[cVehicleCode]NVARCHAR(20) NOT NULL,
[cLocalCode]NVARCHAR(20) NOT NULL,
[cBrandCode]NVARCHAR(20) NOT NULL,
[cCsr] NVARCHAR(2048) NOT NULL,
[cCert] NVARCHAR(2048) NOT NULL,
[cMessage] NVARCHAR(250) NOT NULL,
[cIssueCount] INT NOT NULL,
[cDateTime] DATETIME2 NOT NULL
)

View File

@ -0,0 +1,8 @@
CREATE TABLE [dbo].[tOcsp]
(
[cCuid] BIGINT NOT NULL PRIMARY KEY,
[cStatus] NVARCHAR(20) NOT NULL,
[cVerify] NVARCHAR(20) NOT NULL,
[cOcsp] NVARCHAR(MAX) NULL,
[cDateTime] DATETIME2 NOT NULL
)

View File

@ -0,0 +1,19 @@
CREATE TABLE [dbo].[tTbscsr]
(
[cCuid] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1),
[cIftid] NVARCHAR(100) NOT NULL,
[cMacaddr] NVARCHAR(100) NOT NULL,
[cWmi] NVARCHAR(20) NOT NULL,
[cIdType] NVARCHAR(10)NOT NULL,
[cSupplierId] NVARCHAR(10) NOT NULL,
[cDc] NVARCHAR(20) NOT NULL,
[cTierCode]NVARCHAR(20) NOT NULL,
[cUnitCode]NVARCHAR(20) NOT NULL,
[cPublickey]NVARCHAR(1024) NOT NULL,
[cCertType]NVARCHAR(20) NOT NULL,
[cOriginTbscsr] NVARCHAR(4000) NOT NULL,
[cHashedTbscsr] NVARCHAR(1024) NOT NULL,
[cPcid] NVARCHAR(50) NOT NULL,
[cDn]NVARCHAR(250) NOT NULL,
[cDateTime] DATETIME2 NOT NULL
)

View File

@ -0,0 +1,5 @@
CREATE TABLE [dbo].[tVerifyResult]
(
[cCuid] BIGINT NOT NULL PRIMARY KEY,
[cResult] NCHAR(20) NOT NULL
)