Fix coredata SQL queries using new FKs columms
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -83,7 +83,7 @@ func (p *Document) LoadByID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -135,7 +135,7 @@ func (p *Document) LoadByIDWithFilter(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -188,7 +188,7 @@ func (p *Documents) LoadByIDs(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -270,7 +270,7 @@ func (p *Documents) LoadByOrganizationID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -321,7 +321,7 @@ func (p *Documents) LoadAllByOrganizationID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -371,7 +371,7 @@ INSERT INTO
|
||||
tenant_id,
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
owner_profile_id,
|
||||
title,
|
||||
document_type,
|
||||
classification,
|
||||
@@ -384,7 +384,7 @@ VALUES (
|
||||
@tenant_id,
|
||||
@document_id,
|
||||
@organization_id,
|
||||
@owner_id,
|
||||
@owner_profile_id,
|
||||
@title,
|
||||
@document_type,
|
||||
@classification,
|
||||
@@ -399,7 +399,7 @@ VALUES (
|
||||
"tenant_id": scope.GetTenantID(),
|
||||
"document_id": p.ID,
|
||||
"organization_id": p.OrganizationID,
|
||||
"owner_id": p.OwnerID,
|
||||
"owner_profile_id": p.OwnerID,
|
||||
"title": p.Title,
|
||||
"document_type": p.DocumentType,
|
||||
"classification": p.Classification,
|
||||
@@ -460,7 +460,7 @@ UPDATE
|
||||
SET
|
||||
title = @title,
|
||||
current_published_version = @current_published_version,
|
||||
owner_id = @owner_id,
|
||||
owner_profile_id = @owner_profile_id,
|
||||
document_type = @document_type,
|
||||
classification = @classification,
|
||||
trust_center_visibility = @trust_center_visibility,
|
||||
@@ -477,7 +477,7 @@ WHERE
|
||||
"updated_at": time.Now(),
|
||||
"title": p.Title,
|
||||
"current_published_version": p.CurrentPublishedVersion,
|
||||
"owner_id": p.OwnerID,
|
||||
"owner_profile_id": p.OwnerID,
|
||||
"document_type": p.DocumentType,
|
||||
"classification": p.Classification,
|
||||
"trust_center_visibility": p.TrustCenterVisibility,
|
||||
@@ -548,7 +548,7 @@ WITH scoped_documents AS (
|
||||
SELECT
|
||||
scoped_documents.id,
|
||||
scoped_documents.organization_id,
|
||||
scoped_documents.owner_id,
|
||||
scoped_documents.owner_profile_id,
|
||||
scoped_documents.title,
|
||||
scoped_documents.document_type,
|
||||
scoped_documents.classification,
|
||||
@@ -638,7 +638,7 @@ WITH scoped_documents AS (
|
||||
SELECT
|
||||
scoped_documents.id,
|
||||
scoped_documents.organization_id,
|
||||
scoped_documents.owner_id,
|
||||
scoped_documents.owner_profile_id,
|
||||
scoped_documents.title,
|
||||
scoped_documents.document_type,
|
||||
scoped_documents.classification,
|
||||
|
||||
Reference in New Issue
Block a user