This project is read-only.

Module won't rebuild database tables

May 6, 2011 at 9:09 PM

I installed this module, and then uninstalled it. In doing so, I also deleted the tables from the database. I reinstalled the module, but the tables were not recreated. How do you force the module to rebuild the tables?

May 9, 2011 at 12:32 PM


Thanks for your feedback. I think this is a Orchard issue. I guess that module uninstallation is not really supported by Orchard at the moment.

Since you already deleted the tables, try the following command on Orchard console:

package uninstall Mello.ImageGallery

Also, there's a User Voice request to implent this feature:


Gabriel Mello

Jul 21, 2011 at 8:59 PM

You didn't really answer his question and I have the same issue... I installed the module, did some testing and something I did caused an error whenever I tried to access the ImageGallery in the admin. So I wanted to completely reinstall it. I uninstalled the module from the console and deleted the database tables but now when I reinstall it the database tables are not recreated. Is there a way to force it to create the db tables?

Jul 21, 2011 at 9:12 PM


Sorry for the inconvenience. Have you tried to delete the ImageGallery folder inside the media folder? Maybe there's something there that is preventing you from reinstalling.

Could you provide the error message/stacktrace?


Gabriel Mello

Jul 21, 2011 at 9:56 PM

After I uninstalled the module I also manually deleted the 3 tables from the database: Mello_ImageGallery_ImageGallerySettingsRecord, Mello_ImageGallery_ImageGalleryRecord and Mello_ImageGallery_ImageGalleryImageSettingsRecord. I then reinstalled the ImageGallery module. Those three database tables were not recreated. Now when I try to add a new image gallery in the admin I get System.Data.SqlClient.SqlException: Invalid object name 'test_Mello_ImageGallery_ImageGallerySettingsRecord'. Because the tables do not exist in the database. Is there a way to recreate the database tables your module needs?