This project is read-only.

Issue with Module Installation

Topics: Writing modules
May 25, 2011 at 4:18 PM

I've developed a widget that works perfectly in one instance of Orchard. However, when I try any other instance, I continue to receive the exception "The specified table does not exist" when trying to add the widget to a content area. My datamigration file is pretty simplistic:

        public int Create() {
			// Creating table WeatherPartRecord
            SchemaBuilder.CreateTable("WeatherWidget", table => table
				.Column("webServiceUrl", DbType.String)
				.Column("searchString", DbType.String)
				.Column("partnerId", DbType.String)
				.Column("licenseKey", DbType.String)
                .Column("minutesToCache", DbType.Int32)

            ContentDefinitionManager.AlterPartDefinition(typeof(WeatherWidgetPart).Name, cfg => cfg.Attachable());

            // Create a new widget content type with our map
            ContentDefinitionManager.AlterTypeDefinition("WeatherWidget", cfg => cfg
                .WithSetting("Stereotype", "Widget"));

            return 1;

Any ideas?

May 25, 2011 at 4:52 PM

Your table should be called "WeatherWidgetPartRecord" not "WeatherWidget".