[성현모] CPMeta경로 변경, 테이블 이름 수정, 스캐폴드

This commit is contained in:
SHM
2025-10-30 12:24:37 +09:00
parent 24a2eed617
commit bb44f2af79
14 changed files with 20 additions and 21 deletions

View File

@ -11,11 +11,13 @@ public partial class CPMetaContext : DbContext
{
}
public virtual DbSet<tWbmsMetum> tWbmsMeta { get; set; }
public virtual DbSet<tWbm> tWbms { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<tWbmsMetum>(entity =>
modelBuilder.UseCollation("SQL_Latin1_General_CP1_CI_AS");
modelBuilder.Entity<tWbm>(entity =>
{
entity.HasKey(e => e.cProductID).HasName("PK_cProductKey");

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace SystemX.Core.DB;
public partial class tWbmsMetum
public partial class tWbm
{
public string cProductID { get; set; } = null!;

View File

@ -1,73 +0,0 @@
<?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.CPMeta</Name>
<SchemaVersion>2.0</SchemaVersion>
<ProjectVersion>4.1</ProjectVersion>
<ProjectGuid>{17ab3eb0-6388-401f-96df-e45ba58a548e}</ProjectGuid>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
<OutputType>Database</OutputType>
<RootPath>
</RootPath>
<RootNamespace>SystemX.DB.CPMeta</RootNamespace>
<AssemblyName>SystemX.DB.CPMeta</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>
<TreatTSqlWarningsAsErrors>False</TreatTSqlWarningsAsErrors>
</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" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Tables\tWbmsMeta.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

@ -1,13 +0,0 @@
CREATE TABLE [dbo].[tWbmsMeta]
(
[cProductID] NVARCHAR(50) NOT NULL,
[cMacAddress] NVARCHAR(50) NULL,
[cType] NVARCHAR(20) NULL,
[cProductNo] NVARCHAR(50) NULL,
[cSpareValue] NVARCHAR(200) NULL,
[cDateTime] DATETIME2 NOT NULL,
CONSTRAINT PK_cProductKey PRIMARY KEY (cProductID),
CONSTRAINT UQ_cMacAddress UNIQUE (cMacAddress),
)