decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
|
|
@ -0,0 +1,72 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateInquiryCompleteTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'InquiryComplete_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE InquiryComplete_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[end_status] [tinyint] NOT NULL,
|
||||
[start_status] [tinyint] NOT NULL,
|
||||
[target_bcustno] [nvarchar] (16) NOT NULL,
|
||||
[target_character] [nvarchar] (16) NOT NULL,
|
||||
[GM] [nvarchar] (16) NOT NULL,
|
||||
[former_GM] [nvarchar] (16) NOT NULL,
|
||||
[remain_number] [tinyint] NOT NULL,
|
||||
[inquery_use] [nvarchar] (16) NOT NULL,
|
||||
[group_processing] [nvarchar] (16) NOT NULL,
|
||||
[post_time] [datetime] NOT NULL,
|
||||
[start_time] [datetime] NOT NULL,
|
||||
[end_time] [datetime] NOT NULL CONSTRAINT [DF_InquiryComplete_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_InquiryComplete_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_target_bcustno_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[target_bcustno] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_GM_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[GM] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_end_time_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[end_time] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue