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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreInstalling a second store into one DatabaseInstalling a second store into one Database
Previous
 
Next
New Post
4/27/2008 8:16 PM
 

 

Hi All

The  following files do not use the {objectQualifier} tag for constraint names.  This means that the code fails when you try to install a second store to a database.

02.00.00.SqlDataProvider
02.00.03.SqlDataProvider
02.00.06.SqlDataProvider

A unified diff that fixes the problem is included below.

Thanks

Stuart

 

Index: 02.00.00.SqlDataProvider
===================================================================
--- 02.00.00.SqlDataProvider    (revision 53)
+++ 02.00.00.SqlDataProvider    (working copy)
@@ -5,7 +5,7 @@
 
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Administration
-    ADD    [ShowTax] [bit] NOT NULL CONSTRAINT [DF_Store_Administration_ShowTax] DEFAULT ((0))
+    ADD    [ShowTax] [bit] NOT NULL CONSTRAINT [DF_{objectQualifier}Store_Administration_ShowTax] DEFAULT ((0))
 GO
 
 
@@ -23,16 +23,16 @@
 
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders
-    ADD [OrderIsPlaced] [bit] NOT NULL CONSTRAINT [DF_Store_Orders_OrderIsPlaced] DEFAULT ((0))
+    ADD [OrderIsPlaced] [bit] NOT NULL CONSTRAINT [DF_{objectQualifier}Store_Orders_OrderIsPlaced] DEFAULT ((0))
 GO
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders
-    ADD [OrderStatusID] [int] NOT NULL CONSTRAINT [DF_Store_Orders_OrderStatus] DEFAULT ((1))
+    ADD [OrderStatusID] [int] NOT NULL CONSTRAINT [DF_{objectQualifier}Store_Orders_OrderStatus] DEFAULT ((1))
 GO
 
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Products
-    ADD    [ProductWeight] [decimal] (10, 2) NOT NULL CONSTRAINT [DF_Store_Products_ProductWeight] DEFAULT ((1))
+    ADD    [ProductWeight] [decimal] (10, 2) NOT NULL CONSTRAINT [DF_{objectQualifier}Store_Products_ProductWeight] DEFAULT ((1))
 GO
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Products
@@ -58,7 +58,7 @@
 GO
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_OrderStatus
-    ADD CONSTRAINT [PK_Store_OrderStatus] PRIMARY KEY CLUSTERED  ([OrderStatusID])
+    ADD CONSTRAINT [PK_{objectQualifier}Store_OrderStatus] PRIMARY KEY CLUSTERED  ([OrderStatusID])
 GO
 
 CREATE TABLE {databaseOwner}{objectQualifier}Store_ShippingRates
@@ -71,9 +71,9 @@
 [Cost] [money] NOT NULL
 )
 
-ALTER TABLE {databaseOwner}{objectQualifier}Store_ShippingRates ADD CONSTRAINT [PK_Store_ShippingRates] PRIMARY KEY CLUSTERED  ([ID])
+ALTER TABLE {databaseOwner}{objectQualifier}Store_ShippingRates ADD CONSTRAINT [PK_{objectQualifier}Store_ShippingRates] PRIMARY KEY CLUSTERED  ([ID])
 GO
-ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders ADD CONSTRAINT [FK_Store_Orders_Store_Orders] FOREIGN KEY ([OrderID]) REFERENCES {databaseOwner}{objectQualifier}Store_Orders ([OrderID])
+ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders ADD CONSTRAINT [FK_{objectQualifier}Store_Orders_{objectQualifier}Store_Orders] FOREIGN KEY ([OrderID]) REFERENCES {databaseOwner}{objectQualifier}Store_Orders ([OrderID])
 GO
 
 INSERT INTO {databaseOwner}{objectQualifier}Store_OrderStatus(OrderStatusText, ListOrder)
@@ -91,7 +91,7 @@
 
 GO
 
-ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders ADD CONSTRAINT [FK_Store_Orders_Store_OrderStatus] FOREIGN KEY ([OrderStatusID]) REFERENCES {databaseOwner}{objectQualifier}Store_OrderStatus ([OrderStatusID])
+ALTER TABLE {databaseOwner}{objectQualifier}Store_Orders ADD CONSTRAINT [FK_{objectQualifier}Store_Orders_{objectQualifier}Store_OrderStatus] FOREIGN KEY ([OrderStatusID]) REFERENCES {databaseOwner}{objectQualifier}Store_OrderStatus ([OrderStatusID])
 GO
 
 CREATE PROCEDURE {databaseOwner}{objectQualifier}Store_Orders_GetOrdersByStatusID
Index: 02.00.03.SqlDataProvider
===================================================================
--- 02.00.03.SqlDataProvider    (revision 53)
+++ 02.00.03.SqlDataProvider    (working copy)
@@ -1,6 +1,6 @@
 if not exists (select * from dbo.sysobjects where name = 'DF_Store_Products_IsDeleted')
     ALTER TABLE {databaseOwner}{objectQualifier}Store_Products ADD
-        IsDeleted bit NOT NULL CONSTRAINT DF_Store_Products_IsDeleted DEFAULT 0
+        IsDeleted bit NOT NULL CONSTRAINT DF_{objectQualifier}Store_Products_IsDeleted DEFAULT 0
 GO
 
 ALTER PROCEDURE {databaseOwner}{objectQualifier}Store_Products_DeleteProduct
Index: 02.00.06.SqlDataProvider
===================================================================
--- 02.00.06.SqlDataProvider    (revision 53)
+++ 02.00.06.SqlDataProvider    (working copy)
@@ -65,9 +65,9 @@
 GO
 
 ALTER TABLE {databaseOwner}{objectQualifier}Store_Products
- ADD ProductHeight DECIMAL(10, 2) not null CONSTRAINT [DF_Store_Products_ProductHeight] DEFAULT (1),
- ProductLength DECIMAL(10, 2) not null CONSTRAINT [DF_Store_Products_ProductLength] DEFAULT (1),
- ProductWidth  DECIMAL(10, 2) not null CONSTRAINT [DF_Store_Products_ProductProductWidth] DEFAULT (1);
+ ADD ProductHeight DECIMAL(10, 2) not null CONSTRAINT [DF_{objectQualifier}Store_Products_ProductHeight] DEFAULT (1),
+ ProductLength DECIMAL(10, 2) not null CONSTRAINT [DF_{objectQualifier}Store_Products_ProductLength] DEFAULT (1),
+ ProductWidth  DECIMAL(10, 2) not null CONSTRAINT [DF_{objectQualifier}Store_Products_ProductProductWidth] DEFAULT (1);
 GO
 
 ALTER PROCEDURE {databaseOwner}{objectQualifier}Store_Products_AddProduct

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreInstalling a second store into one DatabaseInstalling a second store into one Database


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