[성현모] VPKI 프로젝트 Import

This commit is contained in:
SHM
2025-04-24 15:42:47 +09:00
parent 0a6016bc95
commit 8dcddd431b
188 changed files with 280230 additions and 68 deletions

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Operations Version="1.0" xmlns="http://schemas.microsoft.com/sqlserver/dac/Serialization/2012/02">
<Operation Name="Rename Refactor" Key="7ca1fbc9-cead-4c01-b8df-1a9a69e13266" ChangeDateTime="12/03/2024 00:57:27">
<Property Name="ElementName" Value="[dbo].[tUser].[Id]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tUser]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cGuid" />
</Operation>
<Operation Name="Rename Refactor" Key="7e3c9cab-1b27-43f3-8519-960704ce037b" ChangeDateTime="12/03/2024 00:57:30">
<Property Name="ElementName" Value="[dbo].[tUser].[username]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tUser]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cUsername" />
</Operation>
<Operation Name="Rename Refactor" Key="f0511507-0a0d-4bde-a3b2-39b5106c85f0" ChangeDateTime="12/03/2024 01:00:03">
<Property Name="ElementName" Value="[dbo].[tUser].[cGuid]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tUser]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cAuid" />
</Operation>
<Operation Name="Rename Refactor" Key="da1fde46-473c-41bb-aa02-260e3385475d" ChangeDateTime="12/03/2024 01:04:01">
<Property Name="ElementName" Value="[dbo].[tRole].[Id]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tRole]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cAuid" />
</Operation>
<Operation Name="Rename Refactor" Key="8f767203-3e50-46b7-a513-53461cf358ac" ChangeDateTime="12/03/2024 01:06:25">
<Property Name="ElementName" Value="[dbo].[tUser].[cUsername]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tUser]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cUserID" />
</Operation>
<Operation Name="Rename Refactor" Key="4b1fa7eb-a0b5-425d-8358-7a8ca6cff7ad" ChangeDateTime="12/03/2024 01:06:31">
<Property Name="ElementName" Value="[dbo].[tRole].[cRole]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tRole]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cRoleID" />
</Operation>
<Operation Name="Rename Refactor" Key="5e298150-8e73-458c-aad7-8bf15975edc0" ChangeDateTime="12/03/2024 01:08:52">
<Property Name="ElementName" Value="[dbo].[tRefreshToken].[Id]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tRefreshToken]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cAuid" />
</Operation>
<Operation Name="Rename Refactor" Key="6b49864f-05d3-40ae-9c55-b7845af2d49e" ChangeDateTime="01/20/2025 00:52:23">
<Property Name="ElementName" Value="[dbo].[tUser].[cBlock]" />
<Property Name="ElementType" Value="SqlSimpleColumn" />
<Property Name="ParentElementName" Value="[dbo].[tUser]" />
<Property Name="ParentElementType" Value="SqlTable" />
<Property Name="NewName" Value="cState" />
</Operation>
</Operations>

View File

@ -0,0 +1,84 @@
<?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>VPKI.AccountDB</Name>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{6d9f945f-42ae-4c95-9656-a24fa23f4782}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
<RootNamespace>VPKI.AccountDB</RootNamespace>
<AssemblyName>VPKI.AccountDB</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>
<Recovery>SIMPLE</Recovery>
</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\Tables" />
<Folder Include="dbo\StoredProcedures" />
<Folder Include="dbo\Functions" />
<Folder Include="dbo\Scripts" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Tables\tUser.sql" />
<Build Include="dbo\Tables\tRole.sql" />
<Build Include="dbo\Tables\tRefreshToken.sql" />
</ItemGroup>
<ItemGroup>
<RefactorLog Include="VPKI.AccountDB.refactorlog" />
</ItemGroup>
<ItemGroup>
<PostDeploy Include="dbo\Scripts\scriptAfterBuild.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,20 @@
/*
배포 후 스크립트 템플릿
--------------------------------------------------------------------------------------
이 파일에는 빌드 스크립트에 추가될 SQL 문이 있습니다.
SQLCMD 구문을 사용하여 파일을 배포 후 스크립트에 포함합니다.
예: :r .\myfile.sql
SQLCMD 구문을 사용하여 배포 후 스크립트의 변수를 참조합니다.
예: :setvar TableName MyTable
SELECT * FROM [$(TableName)]
--------------------------------------------------------------------------------------
*/
IF NOT EXISTS (SELECT 1 FROM tUser WHERE cUserID = 'Alis')
BEGIN
INSERT INTO tUser (cUserID, cAuid, cPasswordHashed, cState, cCreateDateTime, cLastLoginDateTime)
VALUES ('Alis', 'SuperUser' ,'oKLQCdunc2kT5aAVfK+POKwd8R3p8OZvs/NATwpg4gM=' ,1 ,GETDATE(), GETDATE());
INSERT INTO tRole(cAuid, cRoleID, cRoleName)
VALUES ('SuperUser','20','SuperUser');
END

View File

@ -0,0 +1,5 @@
CREATE TABLE [dbo].[tRefreshToken]
(
[cAuid] NVARCHAR(250) NOT NULL PRIMARY KEY,
[cRefreshToken] NVARCHAR(1000) NOT NULL
)

View File

@ -0,0 +1,6 @@
CREATE TABLE [dbo].[tRole]
(
[cAuid] NVARCHAR(250) NOT NULL PRIMARY KEY,
[cRoleID] TINYINT NOT NULL,
[cRoleName] NVARCHAR(20) NOT NULL
)

View File

@ -0,0 +1,10 @@
CREATE TABLE [dbo].[tUser]
(
[cUserID] NVARCHAR(50) NOT NULL,
[cAuid] NVARCHAR(250) NOT NULL ,
[cPasswordHashed] NVARCHAR(250) NOT NULL,
[cState] tinyint NOT NULL,
[cCreateDateTime] DATETIME2 NOT NULL,
[cLastLoginDateTime] DATETIME2 NULL,
PRIMARY KEY ([cUserID])
)