Initial Commit of the PDM project (ready for DWS migration)

This commit is contained in:
will
2026-04-20 08:42:38 -05:00
commit dda7b664e7
2721 changed files with 442772 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
SELECT DISTINCT
d.DocumentID,
d.Filename AS [FileName],
--p.Path AS [FolderPath],
p.Path + d.Filename AS [FullVaultPath]
--v.ValueText,
--d.DocumentID
--d.CurrentVersion
FROM [Drilling_Test].[dbo].[Documents] d
INNER JOIN [Drilling_Test].[dbo].[DocumentsInProjects] dp on d.[DocumentID] = dp.DocumentID
INNER JOIN [Drilling_Test].[dbo].[Projects] p on dp.ProjectID = p.ProjectID
INNER JOIN [Drilling_Test].[dbo].[VariableValue] v on d.DocumentID = v.DocumentID
WHERE v.VariableID = 57 and p.Path like '%DWS%'
ORDER BY [FullVaultPath] asc;

View File

@@ -0,0 +1,24 @@
/*
Here we are basically just doing SELECT * FROM VariableValue WHERE VariableID = 57
The reason we are doing all the join statements is we are trying to target only the files in the
DWS folder, so we need the other tables in order to construct a path
*/
SELECT
v.VariableID,
v.DocumentID,
v.ProjectID,
v.RevisionNo,
v.ConfigurationID,
v.ValueText,
v.ValueInt,
v.ValueFloat,
v.ValueDate,
v.ValueCache,
v.IsLongText
FROM [Drilling_Test].[dbo].[Documents] d
INNER JOIN [Drilling_Test].[dbo].[DocumentsInProjects] dp on d.[DocumentID] = dp.DocumentID
INNER JOIN [Drilling_Test].[dbo].[Projects] p on dp.ProjectID = p.ProjectID
INNER JOIN [Drilling_Test].[dbo].[VariableValue] v on d.DocumentID = v.DocumentID
WHERE v.VariableID = 57 and p.Path like '%DWS%'
ORDER BY v.DocumentID asc;

View File

@@ -0,0 +1,14 @@
SELECT TOP (1000) [ConfigurationID]
,[ConfigurationName]
FROM [_Citadel_CS].[dbo].[DocumentConfiguration]
SELECT *
FROM [_Citadel_CS].[dbo].[DocumentConfiguration]
WHERE ConfigurationName IN (
SELECT ConfigurationName
FROM [_Citadel_CS].[dbo].[DocumentConfiguration]
GROUP BY ConfigurationName
HAVING COUNT(*) > 1
);

View File

@@ -0,0 +1,6 @@
-- Get all distinct VariableIDs for a given DocumentID
-- Pass DocumentID as parameter (?)
SELECT DISTINCT VariableID
FROM [Drilling_Test].[dbo].[VariableValue]
WHERE DocumentID = ?

View File

@@ -0,0 +1,9 @@
-- Insert a VariableValue row that mirrors an existing VV-57 row but with
-- VariableID = 50 (used by copy_57_to_50 task).
-- Parameter order MUST match build_params() in copy_57_to_50:
-- VariableID, DocumentID, ProjectID, RevisionNo, ConfigurationID,
-- ValueText, ValueInt, ValueFloat, ValueDate, ValueCache, IsLongText
INSERT INTO [Drilling_Test].[dbo].[VariableValue]
(VariableID, DocumentID, ProjectID, RevisionNo, ConfigurationID,
ValueText, ValueInt, ValueFloat, ValueDate, ValueCache, IsLongText)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);