Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesChanging Module Version or Keep same and Repair - Install ScriptChanging Module Version or Keep same and Repair - Install Script
Previous
 
Next
New Post
9/17/2012 10:28 AM
 
What do you mean by up-gradable?
I don't follow what you are saying.
 
New Post
9/17/2012 10:35 AM
 
OK maybe I follow - is that property listed in the Host - module settings?
If so, I am not using the IUpgradable interface - if that is what you mean.
 
New Post
9/17/2012 11:16 AM
 
John,

Yes, I was trying to ask if the module is using the IUpgradable interface. Having trouble with my thumbs - all ten of them.

Do you have IF EXIST ... DROP ... CREATE in your Install script or IF !EXIST ... CREATE?

Bill
 
New Post
9/17/2012 12:59 PM
 
iUpgradable support is not necessary for running upgrade scripts.
There must be an issue with either script registration in module manifest or the script itself.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/17/2012 3:51 PM
 

Here is my script:

-- drop StoredProcedure if it exists
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ATI_ImpersonateUser_GetUsers]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[ATI_ImpersonateUser_GetUsers]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE ATI_ImpersonateUser_GetUsers 
-- SPROC parameters
@IncludeSuperUsers int = 0

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

    
IF @IncludeSuperUsers = 1 
-- return all users
BEGIN
WITH ProfileProperties (_uid, PropertyName, PropertyValue) AS 
( SELECT up.UserID as _uid, PropertyName, up.PropertyValue 
FROM dbo.UserProfile up INNER JOIN ProfilePropertyDefinition ppd ON up.PropertyDefinitionID = ppd.PropertyDefinitionID)

SELECT X.FirstName, X.LastName, X.Username, X.Email, X.DisplayName, X.Company, X.IsSuperUser, X.UserID
FROM Users u 
INNER JOIN ProfileProperties pp ON u.UserID = pp._uid PIVOT (MAX(PropertyValue) FOR pp.PropertyName IN ( [Company])) X 
INNER JOIN aspnet_Users au ON X.Username = au.Username 
INNER JOIN aspnet_Membership am ON au.UserID = am.UserID 
-- filter out deleted users
WHERE X.IsDeleted = 0;

RETURN;
END;

-- return recordset that does NOT include the superusers
WITH ProfileProperties (_uid, PropertyName, PropertyValue) AS 
( SELECT up.UserID as _uid, PropertyName, up.PropertyValue 
FROM dbo.UserProfile up INNER JOIN ProfilePropertyDefinition ppd ON up.PropertyDefinitionID = ppd.PropertyDefinitionID)

SELECT X.FirstName, X.LastName, X.Username, X.Email, X.DisplayName, X.Company, X.IsSuperUser, X.UserID
FROM Users u 
INNER JOIN ProfileProperties pp ON u.UserID = pp._uid PIVOT (MAX(PropertyValue) FOR pp.PropertyName IN ( [Company])) X 
INNER JOIN aspnet_Users au ON X.Username = au.Username 
INNER JOIN aspnet_Membership am ON au.UserID = am.UserID
 
-- filter out deleted users
WHERE X.IsDeleted = 0 and
X.IsSuperUser = 0;

END
GO


And here is my uninstall script:

DROP PROCEDURE [dbo].[ATI_ImpersonateUser_GetUsers]
GO

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesChanging Module Version or Keep same and Repair - Install ScriptChanging Module Version or Keep same and Repair - Install Script


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out