Refactoring the current sql syntax providers to better work with sql ce, sql server and mysql. Adding migrations for v4.8 and v6.0. Adding test cases for upgrading from 4.7 to 6.0 for the 3 database providers - sql ce, sql server and mysql. Adding product name to the MigrationAttribute, which adds more flexibility to the MigrationRunner. Fixing schema creation for mysql, which broke during a previous refactor task.
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using NUnit.Framework;
|
|
using Umbraco.Core.Persistence;
|
|
using Umbraco.Core.Persistence.SqlSyntax;
|
|
using Umbraco.Tests.TestHelpers;
|
|
|
|
namespace Umbraco.Tests.Persistence
|
|
{
|
|
[TestFixture, NUnit.Framework.Ignore]
|
|
public class MySqlDatabaseCreationTest : BaseDatabaseTest
|
|
{
|
|
#region Overrides of BaseDatabaseTest
|
|
|
|
public override string ConnectionString
|
|
{
|
|
get { return "Server = 169.254.120.3; Database = testdb; Uid = umbraco; Pwd = umbraco"; }
|
|
}
|
|
|
|
public override string ProviderName
|
|
{
|
|
get { return "MySql.Data.MySqlClient"; }
|
|
}
|
|
|
|
public override ISqlSyntaxProvider SyntaxProvider
|
|
{
|
|
get { return MySqlSyntaxProvider.Instance; }
|
|
}
|
|
|
|
#endregion
|
|
|
|
[Test]
|
|
public void Can_Assert_Created_Database()
|
|
{
|
|
bool umbracoNodeTable = Database.TableExist("umbracoNode");
|
|
bool umbracoUserTable = Database.TableExist("umbracoUser");
|
|
bool cmsTagsTable = Database.TableExist("cmsTags");
|
|
|
|
Assert.That(umbracoNodeTable, Is.True);
|
|
Assert.That(umbracoUserTable, Is.True);
|
|
Assert.That(cmsTagsTable, Is.True);
|
|
}
|
|
}
|
|
} |