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
58
decomp/schema/GMRustyHearts/columns.tsv
Normal file
58
decomp/schema/GMRustyHearts/columns.tsv
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
table column_id column type max_length precision scale is_nullable is_identity default
|
||||
dbo.Admin_Sys_Param 1 seq int 4 10 0 0 1
|
||||
dbo.Admin_Sys_Param 2 param_name nvarchar 100 0 0 0 0
|
||||
dbo.Admin_Sys_Param 3 param_value nvarchar 510 0 0 0 0
|
||||
dbo.Admin_Sys_Param 4 remark1 nvarchar 100 0 0 0 0
|
||||
dbo.Admin_Sys_Param 5 remark2 nvarchar 100 0 0 0 0
|
||||
dbo.Admin_Sys_Param 6 read_yn int 4 10 0 1 0
|
||||
dbo.Admin_Sys_Param 7 regdate datetime 8 23 3 0 0
|
||||
dbo.AdminRoles 1 Idx int 4 10 0 0 1
|
||||
dbo.AdminRoles 2 AdminID nvarchar 100 0 0 0 0
|
||||
dbo.AdminRoles 3 AdminPW nvarchar 100 0 0 0 0
|
||||
dbo.AdminRoles 4 AdminRoles nvarchar 100 0 0 0 0
|
||||
dbo.AdminRoles 5 RegDate datetime 8 23 3 0 0 (getdate())
|
||||
dbo.AdminRoles 6 RegName nvarchar 100 0 0 1 0
|
||||
dbo.AdminRoles 7 AdminYN nchar 4 0 0 1 0 (N'N')
|
||||
dbo.AdminRoles 8 accessControlYN nvarchar 4 0 0 1 0 ('N')
|
||||
dbo.AdminRoles 9 ip_1 nvarchar 100 0 0 1 0 ('')
|
||||
dbo.AdminRoles 10 ip_2 nvarchar 100 0 0 1 0 ('')
|
||||
dbo.AdminRoles 11 ip_3 nvarchar 100 0 0 1 0 ('')
|
||||
dbo.GMAudit 1 audit_id uniqueidentifier 16 0 0 0 0 (newid())
|
||||
dbo.GMAudit 2 AdminID nvarchar 100 0 0 0 0
|
||||
dbo.GMAudit 3 world_index int 4 10 0 0 0
|
||||
dbo.GMAudit 4 bcust_id nvarchar 100 0 0 1 0 (N'None')
|
||||
dbo.GMAudit 5 character_id nvarchar 100 0 0 1 0
|
||||
dbo.GMAudit 6 char_name nvarchar 100 0 0 1 0
|
||||
dbo.GMAudit 7 Type nvarchar 200 0 0 0 0
|
||||
dbo.GMAudit 8 Modify nvarchar 3000 0 0 1 0
|
||||
dbo.GMAudit 9 Memo nvarchar 400 0 0 0 0
|
||||
dbo.GMAudit 10 date datetime 8 23 3 0 0 (getdate())
|
||||
dbo.GMInfoTable 1 gm_id int 4 10 0 0 0
|
||||
dbo.GMInfoTable 2 name nvarchar 32 0 0 0 0
|
||||
dbo.GMInfoTable 3 pass nvarchar 32 0 0 0 0
|
||||
dbo.GMInfoTable 4 permission int 4 10 0 0 0
|
||||
dbo.GMInfoTable 5 logout_time datetime 8 23 3 0 0
|
||||
dbo.GMLoginLog 1 Idx bigint 8 19 0 0 1
|
||||
dbo.GMLoginLog 2 AdminID nvarchar 100 0 0 0 0
|
||||
dbo.GMLoginLog 3 RegName nvarchar 100 0 0 1 0
|
||||
dbo.GMLoginLog 4 accessIP nvarchar 100 0 0 1 0
|
||||
dbo.GMLoginLog 5 successYN nvarchar 100 0 0 1 0
|
||||
dbo.GMLoginLog 6 LogDate datetime 8 23 3 0 0 (getdate())
|
||||
dbo.GMLoginLog 7 type nvarchar 100 0 0 0 0 (' ')
|
||||
dbo.POPUP 1 idx int 4 10 0 0 1
|
||||
dbo.POPUP 2 title nvarchar 510 0 0 1 0
|
||||
dbo.POPUP 3 width int 4 10 0 1 0
|
||||
dbo.POPUP 4 height int 4 10 0 1 0
|
||||
dbo.POPUP 5 v_width int 4 10 0 1 0
|
||||
dbo.POPUP 6 v_height int 4 10 0 1 0
|
||||
dbo.POPUP 7 memo text 16 0 0 1 0
|
||||
dbo.POPUP 8 apply nchar 4 0 0 1 0
|
||||
dbo.POPUP 9 wdate datetime 8 23 3 1 0
|
||||
dbo.WorldList 1 world_id tinyint 1 3 0 0 0
|
||||
dbo.WorldList 2 world_name nvarchar 100 0 0 0 0
|
||||
dbo.WorldList 3 db_id nvarchar 100 0 0 1 0 ('')
|
||||
dbo.WorldList 4 db_pw nvarchar 100 0 0 1 0 ('')
|
||||
dbo.WorldList 5 db_catalog nvarchar 100 0 0 1 0 ('')
|
||||
dbo.WorldList 6 db_ip nvarchar 100 0 0 1 0 ('')
|
||||
dbo.X_6217 1 id int 4 10 0 0 1
|
||||
dbo.X_6217 2 ResultTxt nvarchar 8000 0 0 1 0
|
||||
|
0
decomp/schema/GMRustyHearts/empty_procs.txt
Normal file
0
decomp/schema/GMRustyHearts/empty_procs.txt
Normal file
1
decomp/schema/GMRustyHearts/foreign_keys.tsv
Normal file
1
decomp/schema/GMRustyHearts/foreign_keys.tsv
Normal file
|
|
@ -0,0 +1 @@
|
|||
child child_col parent parent_col
|
||||
|
5
decomp/schema/GMRustyHearts/indexes.tsv
Normal file
5
decomp/schema/GMRustyHearts/indexes.tsv
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
table index type_desc is_primary_key is_unique col key_ordinal
|
||||
Admin_Sys_Param PK_Admin_Sys_Param CLUSTERED 1 1 seq 1
|
||||
GMInfoTable PK__GMInfoTa__49B921C107020F21 CLUSTERED 1 1 gm_id 1
|
||||
GMInfoTable UQ__GMInfoTa__72E12F1B09DE7BCC NONCLUSTERED 0 1 name 1
|
||||
WorldList PK_WorldList CLUSTERED 1 1 world_id 1
|
||||
|
71
decomp/schema/GMRustyHearts/procs/CreateCalendar.sql
Normal file
71
decomp/schema/GMRustyHearts/procs/CreateCalendar.sql
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
CREATE PROCEDURE [dbo].[CreateCalendar]
|
||||
/************************************************************************************************************
|
||||
Purpose:
|
||||
Given a start date and an end date, create a calendar of dates that easily traverses months and years. Is
|
||||
capable of generating up to 179 years worth of calendar by month in any given run.
|
||||
Usage Notes:
|
||||
1. End date parameter is optional... if not provided, the start date will be used to return that one month.
|
||||
2. Of the two input paramters, the lowest (earliest) date will be used as the start date regardless of the
|
||||
order provided.
|
||||
3. Returns a single result set containing all dates.
|
||||
4. Does NOT use a Cursor, While Loop, Temp Table, or Table variable so that even really picky DBA's won't
|
||||
reject the code.
|
||||
5. Because only set-based code was used, returns 10 years worth of calendar in about 230 milliseconds.
|
||||
A full year takes a scant 76 milliseconds and a single month takes 63 milliseconds. A hundred-year
|
||||
calendar takes only 6.3 seconds.
|
||||
6. The start date does NOT need to be the first of the month and the end date does NOT need to be the last
|
||||
day of the month. The internal calculations will "auto-magically" include the whole month for both the
|
||||
start and end dates as well as all months in between.
|
||||
Revision History:
|
||||
Rev 00 - 08/13/2007 - Jeff Moden - Initial creation and unit test.
|
||||
************************************************************************************************************/
|
||||
--===== Declare the input parameters
|
||||
@pStartDate DATETIME, --Any date (can include time) in the desired start month
|
||||
@pEndDate DATETIME = @pStartDate --Any date (can include time) in the desired end month
|
||||
AS
|
||||
--===== Create the correct environment
|
||||
SET NOCOUNT ON --Suppress the auto-display of rowcounts to prevent false echos on GUI's
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED --Same as putting WITH (NOLOCK) on tables in query
|
||||
--===== Create the base date that all the calculations rely on (is a Monday)
|
||||
DECLARE @BaseDate DATETIME
|
||||
SET @BaseDate = '1753-01-01'
|
||||
--===== Make sure the inputs are in the correct order (start date must always be the earliest date)
|
||||
IF @pEndDate < @pStartDate
|
||||
BEGIN
|
||||
DECLARE @Swap DATETIME
|
||||
SELECT @Swap = @pStartDate,
|
||||
@pStartDate = @pEndDate,
|
||||
@pEndDate = @Swap
|
||||
END
|
||||
--===== Modify the start to start on the first of the same month and the end date to end on the last day
|
||||
-- of the same month.
|
||||
SET @pStartDate = DATEADD(mm,DATEDIFF(mm,@BaseDate,@pStartDate),@BaseDate)
|
||||
SET @pEndDate = DATEADD(mm,DATEDIFF(mm,@BaseDate,@pEndDate)+1,@BaseDate)-1
|
||||
|
||||
--===== Create the calendar without loops, cursors, or temp tables
|
||||
SELECT MAX(DATENAME(yy,d.TheDate)) AS [Year],
|
||||
MAX(LEFT(DATENAME(mm,d.TheDate),3))AS [Month],
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '월요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Mon,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '화요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Tue,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '수요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Wed,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '목요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Thu,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '금요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Fri,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '토요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Sat,
|
||||
MAX(CASE WHEN DATENAME(dw,d.TheDate) = '일요일' THEN DATENAME(dd,d.TheDate) ELSE '' END) AS Sun
|
||||
FROM (--==== Derived table "d" finds all dates for the given range of dates up to 65535 days apart
|
||||
SELECT YEAR(@pStartDate+n.Number) AS TheYear,
|
||||
MONTH(@pStartDate+n.Number) AS TheMonth,
|
||||
DATEDIFF(dd,@BaseDate,@pStartDate+n.Number)/7 AS TheWeek,
|
||||
@pStartDate+n.Number AS TheDate
|
||||
FROM (--==== Derived table "n" creates numbers from 0 to 65535 (about 179 years worth of days)
|
||||
SELECT t1.Number*256+t2.Number AS Number
|
||||
FROM Master.dbo.spt_Values t1,
|
||||
Master.dbo.spt_Values t2
|
||||
WHERE t1.Type = 'P'
|
||||
AND t2.Type = 'P'
|
||||
)n
|
||||
WHERE @pStartDate+n.Number <= @pEndDate
|
||||
)d
|
||||
GROUP BY d.TheYear,d.TheMonth,d.TheWeek
|
||||
ORDER BY d.TheYear,d.TheMonth,d.TheWeek
|
||||
|
||||
3
decomp/schema/GMRustyHearts/routines.tsv
Normal file
3
decomp/schema/GMRustyHearts/routines.tsv
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
type_desc name parameter_id param type max_length is_output
|
||||
SQL_STORED_PROCEDURE CreateCalendar 1 @pStartDate datetime 8 0
|
||||
SQL_STORED_PROCEDURE CreateCalendar 2 @pEndDate datetime 8 0
|
||||
|
8
decomp/schema/GMRustyHearts/tables.tsv
Normal file
8
decomp/schema/GMRustyHearts/tables.tsv
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
X_6217 0 2
|
||||
WorldList 1 6
|
||||
POPUP 0 9
|
||||
GMLoginLog 5 7
|
||||
GMInfoTable 1 5
|
||||
GMAudit 0 10
|
||||
AdminRoles 1 11
|
||||
Admin_Sys_Param 0 7
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue