diff --git a/src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs b/src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs index a14d63f3b..bf93a8d80 100644 --- a/src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs +++ b/src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs @@ -50,7 +50,6 @@ namespace Orchard.Tests.DataMigration { builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(session)).As(); builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty() }).As(); builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST_" }).As(); - builder.RegisterType().As(); builder.RegisterModule(new DataModule()); _container = builder.Build(); @@ -153,8 +152,8 @@ namespace Orchard.Tests.DataMigration { .Column("City", DbType.String) .Column("ZIP", DbType.Int32, column => column.Unique()) .Column("UserId", DbType.Int32, column => column.NotNull())) - .CreateForeignKey("User_Address", "User", new[] { "UserId" }, "User", new[] { "Id" }) - .DropForeignKey("User", "User_Address"); + .CreateForeignKey("FK_User", "Address", new[] { "UserId" }, "User", new[] { "Id" }) + .DropForeignKey("Address", "FK_User"); } } diff --git a/src/Orchard.Web/Core/Feeds/StandardBuilders/CorePartsFeedItemBuilder.cs b/src/Orchard.Web/Core/Feeds/StandardBuilders/CorePartsFeedItemBuilder.cs index 332c8c698..09b914adf 100644 --- a/src/Orchard.Web/Core/Feeds/StandardBuilders/CorePartsFeedItemBuilder.cs +++ b/src/Orchard.Web/Core/Feeds/StandardBuilders/CorePartsFeedItemBuilder.cs @@ -6,6 +6,7 @@ using System.Xml.Linq; using JetBrains.Annotations; using Orchard.ContentManagement; using Orchard.Core.Feeds.Models; +using Orchard.Utility.Extensions; namespace Orchard.Core.Feeds.StandardBuilders { [UsedImplicitly] @@ -35,16 +36,26 @@ namespace Orchard.Core.Feeds.StandardBuilders { var guid = new XElement("guid", new XAttribute("isPermaLink", "true")); context.Response.Contextualize(requestContext => { - var urlHelper = new UrlHelper(requestContext, _routes); - link.Add(urlHelper.RouteUrl(inspector.Link)); - guid.Add(urlHelper.RouteUrl(inspector.Link)); + var urlHelper = new UrlHelper(requestContext, _routes); + var uriBuilder = new UriBuilder(urlHelper.RequestContext.HttpContext.Request.ToRootUrlString()) { Path = urlHelper.RouteUrl(inspector.Link) }; + link.Add(uriBuilder.Uri.OriginalString); + guid.Add(uriBuilder.Uri.OriginalString); }); feedItem.Element.SetElementValue("title", inspector.Title); feedItem.Element.Add(link); feedItem.Element.SetElementValue("description", inspector.Description); - if (inspector.PublishedUtc != null) - feedItem.Element.SetElementValue("pubDate", inspector.PublishedUtc);//TODO: format + + if ( inspector.PublishedUtc != null ) { + // RFC833 + // The "R" or "r" standard format specifier represents a custom date and time format string that is defined by + // the DateTimeFormatInfo.RFC1123Pattern property. The pattern reflects a defined standard, and the property + // is read-only. Therefore, it is always the same, regardless of the culture used or the format provider supplied. + // The custom format string is "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'". When this standard format specifier is used, + // the formatting or parsing operation always uses the invariant culture. + feedItem.Element.SetElementValue("pubDate", inspector.PublishedUtc.Value.ToString("r")); + } + feedItem.Element.Add(guid); } else { diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj index f61e75da7..9c873a160 100644 --- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj +++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj @@ -140,9 +140,8 @@ False - False - - + True + http://orchard.codeplex.com False diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/DataMigration.txt b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/DataMigration.txt index 007f91089..e80ad786c 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/DataMigration.txt +++ b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/DataMigration.txt @@ -1,4 +1,9 @@ -using System.Data; +using System; +using System.Collections.Generic; +using Orchard.ContentManagement.Drivers; +using Orchard.ContentManagement.MetaData; +using Orchard.ContentManagement.MetaData.Builders; +using Orchard.Core.Contents.Extensions; using Orchard.Data.Migration; namespace $$FeatureName$$.DataMigrations { diff --git a/src/Orchard/Data/Migration/Interpreters/DefaultDataMigrationInterpreter.cs b/src/Orchard/Data/Migration/Interpreters/DefaultDataMigrationInterpreter.cs index 5b01da3e6..a72938d57 100644 --- a/src/Orchard/Data/Migration/Interpreters/DefaultDataMigrationInterpreter.cs +++ b/src/Orchard/Data/Migration/Interpreters/DefaultDataMigrationInterpreter.cs @@ -186,7 +186,7 @@ namespace Orchard.Data.Migration.Interpreters { builder.AppendFormat("alter table {0} alter column {1} ", _dialect.QuoteForTableName(PrefixTableName(command.TableName)), - _dialect.QuoteForColumnName(command.TableName)); + _dialect.QuoteForColumnName(command.ColumnName)); // type if (command.DbType != DbType.Object) { @@ -195,7 +195,7 @@ namespace Orchard.Data.Migration.Interpreters { // [default value] if (!string.IsNullOrEmpty(command.Default)) { - builder.Append(" default ").Append(command.Default).Append(Space); + builder.Append(" set default ").Append(command.Default).Append(Space); } _sqlStatements.Add(builder.ToString()); } @@ -250,7 +250,7 @@ namespace Orchard.Data.Migration.Interpreters { builder.Append(_dialect.GetAddForeignKeyConstraintString(command.Name, command.SrcColumns, - command.DestTable, + _dialect.QuoteForTableName(PrefixTableName(command.DestTable)), command.DestColumns, false)); @@ -266,7 +266,7 @@ namespace Orchard.Data.Migration.Interpreters { var builder = new StringBuilder(); - builder.AppendFormat("alter table {0} drop constraint {1}", command.SrcTable, command.Name); + builder.AppendFormat("alter table {0} drop constraint {1}", _dialect.QuoteForTableName(PrefixTableName(command.SrcTable)), command.Name); _sqlStatements.Add(builder.ToString()); RunPendingStatements(); diff --git a/src/Orchard/Data/Migration/Interpreters/SqlCeCommandInterpreter.cs b/src/Orchard/Data/Migration/Interpreters/SQLiteCommandInterpreter.cs similarity index 90% rename from src/Orchard/Data/Migration/Interpreters/SqlCeCommandInterpreter.cs rename to src/Orchard/Data/Migration/Interpreters/SQLiteCommandInterpreter.cs index 637565da2..a490e911a 100644 --- a/src/Orchard/Data/Migration/Interpreters/SqlCeCommandInterpreter.cs +++ b/src/Orchard/Data/Migration/Interpreters/SQLiteCommandInterpreter.cs @@ -1,7 +1,7 @@ using Orchard.Data.Migration.Schema; namespace Orchard.Data.Migration.Interpreters { - public class SqlCeCommandInterpreter : + public class SQLiteCommandInterpreter : ICommandInterpreter, ICommandInterpreter, ICommandInterpreter, @@ -34,7 +34,7 @@ namespace Orchard.Data.Migration.Interpreters { } public string DataProvider { - get { return "SqlCe"; } + get { return "SQLite"; } } } } diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj index c96397364..70d6c203f 100644 --- a/src/Orchard/Orchard.Framework.csproj +++ b/src/Orchard/Orchard.Framework.csproj @@ -390,7 +390,7 @@ - +