Skip to content

Commit

Permalink
Merge pull request #25 from mattekelly/patch-2
Browse files Browse the repository at this point in the history
Remove View containing dropped table

Fixes #23
  • Loading branch information
bdukes committed May 21, 2014
2 parents f89aace + 78b9e15 commit 47bafae
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions Providers/DataProviders/SqlDataProvider/04.02.03.SqlDataProvider
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,6 @@ select newitemid, oldcategoryid from {databaseOwner}[{objectQualifier}oldcategor

GO


if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}Publish_vwArticleSearchIndexingUpdated]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view {databaseOwner}[{objectQualifier}Publish_vwArticleSearchIndexingUpdated]
GO

create view {databaseOwner}[{objectQualifier}Publish_vwArticleSearchIndexingUpdated] as
select
name, va.itemId, ArticleText, DisplayTabID, IsCurrentVersion, Disabled, va.Description,
MetaKeywords, MetaDescription, MetaTitle, AuthorUserId, LastUpdated, si.ModuleDefId, va.PortalId
from
{objectQualifier}publish_vwArticles va
join
(
select
PubDate, Cast(SUBSTRING(guid, 8,8000) as Int) as 'ItemId', dm.ModuleDefId
from
{objectQualifier}searchitem dsi
join {objectQualifier}modules dm on (dsi.ModuleId = dm.ModuleId)
where
guid like 'ItemId=%'
) si on (si.ItemId = va.ItemId)
where
IsCurrentVersion = 1
and va.LastUpdated > si.PubDate


GO


IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}Publish_vwProducts]') and OBJECTPROPERTY(id, N'IsView') = 1)
DROP VIEW {databaseOwner}[{objectQualifier}Publish_vwProducts]

Expand Down

0 comments on commit 47bafae

Please sign in to comment.