Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions snd/src/org/labkey/snd/query/AttributeDataTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,9 @@ public List<Map<String, Object>> deleteRows(User user, Container container, List
{
for (Map<String, Object> row : oldRows)
{
Integer objectId = (Integer) row.get("ObjectId");
Integer propertyId = (Integer) row.get("PropertyId");
// exp.ObjectProperty.ObjectId is BIGINT as of exp 25.005, so the value arrives as a Long
Number objectId = (Number) row.get("ObjectId");
Number propertyId = (Number) row.get("PropertyId");

SqlExecutor executor = new SqlExecutor(_expSchema);
SQLFragment deleteObjProp = new SQLFragment("delete from " + _expSchema.getName() + ".ObjectProperty\n");
Expand Down
2 changes: 1 addition & 1 deletion snd/src/org/labkey/snd/query/EventDataTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public EventDataTable(SNDUserSchema schema, TableInfo table)
@Override
public void addColumns()
{
BaseColumnInfo objectid = new BaseColumnInfo("ObjectId", this, JdbcType.INTEGER)
BaseColumnInfo objectid = new BaseColumnInfo("ObjectId", this, JdbcType.BIGINT)
{
@Override
public SQLFragment getValueSql(String tableAliasName)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2026 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
-- Dropping UNIQUE idx_labwork_services_serviceid [ServiceId] because it overlaps with PRIMARY pk_snprc_labwork_services [ServiceId]
DROP INDEX snprc_ehr.idx_labwork_services_serviceid;
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ CREATE VIEW [labkey_etl].[v_delete_snd_attributeData] AS
-- Note:
--
-- Changes:
-- Jay Allen - Only propagate a delete if the kew no longer exists in the source. EventDataAndName
-- (PROC_ID + ATTRIB_KEY) is not unique when CAMP holds duplicate attribute rows,
-- so cleaning up duplicate caused ETL to delete the legitimate value from exp.ObjectProperty
--
-- ==========================================================================================

Expand All @@ -29,6 +32,12 @@ SELECT
a.audit_date_tm
FROM audit.audit_coded_proc_attribs AS a
WHERE a.audit_action = 'D'
AND NOT EXISTS (
SELECT 1
FROM dbo.CODED_PROC_ATTRIBS cpa
WHERE cpa.PROC_ID = a.PROC_ID
AND cpa.ATTRIB_KEY = a.ATTRIB_KEY
)
GO

GRANT SELECT on labkey_etl.v_delete_snd_AttributeData to z_labkey
Expand Down
2 changes: 1 addition & 1 deletion snprc_ehr/src/org/labkey/snprc_ehr/SNPRC_EHRModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
return 26.001;
return 26.002;
}

@Nullable
Expand Down
Loading