Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
After several installs of uCommerce I like to come up with a suggestion:
What about installing uCommerce without any demo data (no catalogs, no products, no orders etc) and moving all these things into the uCommerce demo store package? This would give us a plain and empty uCommerce base, no need to clean SQL tables by hand or to delete records using the backend (which only results in setting hidden flags). If someone wants something to play with, the demo store is only a few clicks away. ;)
What do you think? Good idea? Bad idea? Why?
That is a very good Idea. In that way you will get a clean solution and no dependancies on data. It is a mission to get rid of the test data because of the dependancies of the data that are linked to eac other. I did multiple installs of uCommerce and that is one of the problems I came across with the test data!!
Thanks for your reply, Luyolo. It's time to ask the boss: Søren, what do you think? :)
Hi Christian and Luyolo
I have been thinking about this one too, and i agree that i would be nice to have a "clean start" for uCommerce projects. I had the same issue some weeks ago where i wanted to get rid of especially the test-orders. I came up with this homemade SQL script to clear the default uCommerce-database:
delete from uCommerce_ProductCatalogGroupShippingMethodMapdelete from uCommerce_ShippingMethodPaymentMethodsdelete from uCommerce_ShippingMethodPricedelete from uCommerce_ShippingMethodDescriptiondelete from uCommerce_ShippingMethodCountrydelete from uCommerce_OrderLinedelete from uCommerce_Shipmentdelete from uCommerce_ShippingMethoddelete from uCommerce_ProductCatalogGroupPaymentMethodMapdelete from uCommerce_PaymentPropertydelete from uCommerce_PaymentMethodFeedelete from uCommerce_PaymentMethodDescriptiondelete from uCommerce_PaymentMethodCountrydelete from uCommerce_Paymentdelete from uCommerce_PaymentMethoddelete from uCommerce_CategoryProductRelationdelete from uCommerce_ProductDescriptionPropertydelete from uCommerce_ProductDescriptiondelete from uCommerce_ProductPropertydelete from uCommerce_PriceGroupPricedelete from uCommerce_Productdelete from uCommerce_ProductCatalogDescriptiondelete from uCommerce_productdelete from uCommerce_CategoryProductRelationdelete from uCommerce_CategoryPropertydelete from uCommerce_CategoryDescriptiondelete from uCommerce_Categorydelete from uCommerce_ProductCatalogdelete from uCommerce_Addressdelete from uCommerce_OrderStatusAuditupdate uCommerce_PurchaseOrder set BillingAddressId = nulldelete from uCommerce_OrderAddressdelete from uCommerce_PurchaseOrderdelete from uCommerce_ProductCatalogGroupdelete from uCommerce_Countrydelete from uCommerce_PriceGroupdelete from uCommerce_Currencydelete from uCommerce_Customerdelete from uCommerce_DataTypeEnumDescriptiondelete from uCommerce_DataTypeEnumdelete from uCommerce_ProductDefinitionFieldDescriptiondelete from uCommerce_ProductDefinitionFielddelete from uCommerce_DataType where uCommerce_DataType.TypeName = 'License'delete from uCommerce_DataType where uCommerce_DataType.TypeName = 'SupportCoupons'delete from uCommerce_ProductDefinitiondelete from uCommerce_DefinitionFieldDescriptiondelete from uCommerce_DefinitionFielddelete from uCommerce_Definition where uCommerce_Definition.DefinitionTypeId = '1'delete from uCommerce_EmailContentdelete from uCommerce_EmailTypedelete from uCommerce_EmailContentdelete from uCommerce_EmailProfileInformationdelete from uCommerce_EmailProfile
As you write, Luyolo, the dependencies in the database makes it quite difficult to delete the records, but after a lot of "trial and error" i think the order of the delete-statements above will clear the default database. I would rather have truncated the tables to initialize the primary key ID's again, but i cannot get it to work. Maybe Søren is holding the key here? :-)
To avoid the above SQL-script i also think that it would be nice to have a clean uCommerce-install and then put the test-definitions, test-products and test-orders in a separate package or script.
This is awesome! Thanks for sharing, Anders!
Here's an updated version of Anders' script:
delete from uCommerce_ProductCatalogGroupShippingMethodMap
delete from uCommerce_ShippingMethodPaymentMethods
delete from uCommerce_ShippingMethodPrice
delete from uCommerce_ShippingMethodDescription
delete from uCommerce_ShippingMethodCountry
delete from uCommerce_OrderLine
delete from uCommerce_Shipment
delete from uCommerce_ShippingMethod
delete from uCommerce_ProductCatalogGroupPaymentMethodMap
delete from uCommerce_PaymentProperty
delete from uCommerce_PaymentMethodFee
delete from uCommerce_PaymentMethodDescription
delete from uCommerce_PaymentMethodCountry
delete from uCommerce_Payment
delete from uCommerce_PaymentMethod
delete from uCommerce_CategoryProductRelation
delete from uCommerce_ProductDescriptionProperty
delete from uCommerce_ProductDescription
delete from uCommerce_ProductProperty
delete from uCommerce_PriceGroupPrice
delete from uCommerce_Product
delete from uCommerce_ProductCatalogDescription
delete from uCommerce_product
delete from uCommerce_CategoryProperty
delete from uCommerce_CategoryDescription
delete from uCommerce_Category
delete from uCommerce_ProductCatalogPriceGroupRelation
delete from uCommerce_Permission
delete from uCommerce_Role
delete from uCommerce_ProductCatalog
delete from uCommerce_Address
delete from uCommerce_OrderStatusAudit
update uCommerce_PurchaseOrder set BillingAddressId = null
delete from uCommerce_OrderAddress
delete from uCommerce_PurchaseOrder
delete from uCommerce_ProductCatalogGroup
delete from uCommerce_Country
delete from uCommerce_PriceGroup
delete from uCommerce_Currency
delete from uCommerce_Customer
delete from uCommerce_DataTypeEnumDescription
delete from uCommerce_DataTypeEnum
delete from uCommerce_ProductDefinitionFieldDescription
delete from uCommerce_ProductDefinitionField
delete from uCommerce_DataType where uCommerce_DataType.TypeName = 'License'
delete from uCommerce_DataType where uCommerce_DataType.TypeName = 'SupportCoupons'
delete from uCommerce_ProductDefinition
delete from uCommerce_DefinitionFieldDescription
delete from uCommerce_DefinitionField
delete from uCommerce_Definition where uCommerce_Definition.DefinitionTypeId = '1'
delete from uCommerce_EmailContent
delete from uCommerce_EmailType
delete from uCommerce_EmailProfileInformation
delete from uCommerce_EmailProfile
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted