Skip to content

account for non-asset WebhookReceipt blobs and ignore NULL values - #45

Open
pmamut wants to merge 1 commit into
masterfrom
unused-blob-purge-fix
Open

account for non-asset WebhookReceipt blobs and ignore NULL values#45
pmamut wants to merge 1 commit into
masterfrom
unused-blob-purge-fix

Conversation

@pmamut

Copy link
Copy Markdown
Contributor

original script predates WebhookReceipt non-asset table with optional Blob reference fields, for which AssetType & AttributeDefinitionmetadata doesn't exist, as well as optionalExternalActionInvocation.Received` blob attribute

original script predates `WebhookReceipt` non-asset table with optional `Blob` reference fields, for which `AssetType` & AttributeDefinition` metadata doesn't exist, as well as optional `ExternalActionInvocation.Received` blob attribute
join AssetType_Now t on t.ID=d.AssetID
where d.AttributeType='Blob'
select @sql = left(@sql, len(@sql) - len(' union'))
select @sql = @sql + ' select HeadersId from dbo.WebhookReceipt where HeadersId is not null union select ResponseId from dbo.WebhookReceipt where ResponseId is not null'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we discover these by foreign key?

@spazmodius

Copy link
Copy Markdown
Contributor

Remind me why having a Hash saves a Blob from purging?

@pmamut

Copy link
Copy Markdown
ContributorAuthor

Remind me why having a Hash saves a Blob from purging?

Some embedded images uploaded during asset creation weren't converted into full EmbeddedImage assets, and the rich text fields of the assets embedding that image content still contain its hash-based URL. We'd have to grok all of LongString values looking for these URLs and extract their hashes to figure out if blobs having a Hash value are still in use.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pmamut@spazmodius