+
Skip to content

Fix initial site on MySQL #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Mix.Database.Entities.Base
{
public abstract class ExtraColumnMultilanguageSEOContentBase<TPrimaryKey> : MultilanguageSEOContentBase<TPrimaryKey>
public abstract class ExtraColumnMultilanguageSEOContentBase<TPrimaryKey> : MultiLanguageSEOContentBase<TPrimaryKey>
where TPrimaryKey : IComparable
{
public string MixDatabaseName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Mix.Database.Entities.Base
{
public abstract class MultilanguageContentBase<TPrimaryKey> : EntityBase<TPrimaryKey>
public abstract class MultiLanguageContentBase<TPrimaryKey> : EntityBase<TPrimaryKey>
where TPrimaryKey : IComparable
{
public string Specificulture { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Mix.Database.Entities.Base
{
public abstract class MultilanguageSEOContentBase<TPrimaryKey> : MultilanguageContentBase<TPrimaryKey>
public abstract class MultiLanguageSEOContentBase<TPrimaryKey> : MultiLanguageContentBase<TPrimaryKey>
where TPrimaryKey : IComparable
{
public string Title { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Mix.Database.Entities.Base
{
public abstract class MultilanguageUniqueNameContentBase<TPrimaryKey> : MultilanguageContentBase<TPrimaryKey>
public abstract class MultiLanguageUniqueNameContentBase<TPrimaryKey> : MultiLanguageContentBase<TPrimaryKey>
where TPrimaryKey : IComparable
{
public string DisplayName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixConfigurationContent : MultilanguageUniqueNameContentBase<int>
public class MixConfigurationContent : MultiLanguageUniqueNameContentBase<int>
{
public string DefaultContent { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/platform/mix.database/Entities/Cms/MixDataContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixDataContent : MultilanguageSEOContentBase<Guid>
public class MixDataContent : MultiLanguageSEOContentBase<Guid>
{
public int MixDatabaseId { get; set; }
public string MixDatabaseName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixDataContentAssociation : MultilanguageContentBase<Guid>
public class MixDataContentAssociation : MultiLanguageContentBase<Guid>
{
public int MixDatabaseId { get; set; }
public string MixDatabaseName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixDataContentValue : MultilanguageContentBase<Guid>
public class MixDataContentValue : MultiLanguageContentBase<Guid>
{
public string MixDatabaseColumnName { get; set; }
public string MixDatabaseName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixLanguageContent : MultilanguageUniqueNameContentBase<int>
public class MixLanguageContent : MultiLanguageUniqueNameContentBase<int>
{
public string DefaultContent { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/platform/mix.database/Entities/Cms/MixModuleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Mix.Database.Entities.Cms
{
public class MixModuleData : MultilanguageSEOContentBase<int>
public class MixModuleData : MultiLanguageSEOContentBase<int>
{
public string SimpleDataColumns { get; set; }
public string Value { get; set; }
Expand Down
5 changes: 5 additions & 0 deletions src/platform/mix.database/Entities/Cms/_MixCmsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public MixCmsContext(MixDatabaseService databaseService)

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
#if DEBUG
// TODO: will be removed
optionsBuilder.LogTo(Console.WriteLine);
#endif

if (!string.IsNullOrEmpty(_connectionString))
{
switch (_databaseProvider)
Expand Down
5 changes: 2 additions & 3 deletions src/platform/mix.database/Entities/Cms/_MySqlMixCmsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
using Mix.Database.EntityConfigurations.MYSQL;
using Mix.Database.Services;

namespace Mix.Database.Entities.v2
namespace Mix.Database.Entities
{
public class MySqlMixCmsContext : MixCmsContext
{
public MySqlMixCmsContext(MixDatabaseService databaseService)
: base(databaseService)
public MySqlMixCmsContext(MixDatabaseService databaseService) : base(databaseService)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Mix.Database.EntityConfigurations.POSTGRES;
using Mix.Database.Services;

namespace Mix.Database.Entities.v2
namespace Mix.Database.Entities
{
public class PostgresqlMixCmsContext : MixCmsContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Mix.Database.EntityConfigurations.SQLSERVER;
using Mix.Database.Services;

namespace Mix.Database.Entities.v2
namespace Mix.Database.Entities
{
public class SqlServerMixCmsContext : MixCmsContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Mix.Database.EntityConfigurations.SQLITE;
using Mix.Database.Services;

namespace Mix.Database.Entities.v2
namespace Mix.Database.Entities
{
public class SqliteMixCmsContext : MixCmsContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Mix.Database.EntityConfigurations.Base
{
public abstract class ExtraColumnMultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, TConfig>
: MultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, TConfig>
: MultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey, TConfig>
where TPrimaryKey : IComparable
where T : ExtraColumnMultilanguageSEOContentBase<TPrimaryKey>
where TConfig : IDatabaseConstants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

namespace Mix.Database.EntityConfigurations.Base
{
public abstract class MultilanguageContentBaseConfiguration<T, TPrimaryKey, TConfig> : EntityBaseConfiguration<T, TPrimaryKey, TConfig>
public abstract class MultiLanguageContentBaseConfiguration<T, TPrimaryKey, TConfig> : EntityBaseConfiguration<T, TPrimaryKey, TConfig>
where TPrimaryKey : IComparable
where T : MultilanguageContentBase<TPrimaryKey>
where T : MultiLanguageContentBase<TPrimaryKey>
where TConfig : IDatabaseConstants
{
public override void Configure(EntityTypeBuilder<T> builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

namespace Mix.Database.EntityConfigurations.Base
{
public abstract class MultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, TConfig> : MultilanguageContentBaseConfiguration<T, TPrimaryKey, TConfig>
public abstract class MultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey, TConfig> : MultiLanguageContentBaseConfiguration<T, TPrimaryKey, TConfig>
where TPrimaryKey : IComparable
where T : MultilanguageSEOContentBase<TPrimaryKey>
where T : MultiLanguageSEOContentBase<TPrimaryKey>
where TConfig : IDatabaseConstants
{
public override void Configure(EntityTypeBuilder<T> builder)
Expand Down Expand Up @@ -62,8 +62,6 @@ public override void Configure(EntityTypeBuilder<T> builder)
.HasColumnType($"{Config.NString}{Config.MediumLength}")
.HasCharSet(Config.CharSet)
.UseCollation(Config.DatabaseCollation);


}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

namespace Mix.Database.EntityConfigurations.Base
{
public abstract class MultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, TConfig>
: MultilanguageContentBaseConfiguration<T, TPrimaryKey, TConfig>
public abstract class MultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, TConfig>
: MultiLanguageContentBaseConfiguration<T, TPrimaryKey, TConfig>
where TPrimaryKey : IComparable
where T : MultilanguageUniqueNameContentBase<TPrimaryKey>
where T : MultiLanguageUniqueNameContentBase<TPrimaryKey>
where TConfig : IDatabaseConstants
{
public override void Configure(EntityTypeBuilder<T> builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.MYSQL.Base
{
public abstract class MySqlMultilanguageContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
public abstract class MySqlMultiLanguageContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageContentBase<TPrimaryKey>
where T : MultiLanguageContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.MYSQL.Base
{
public abstract class MySqlMultilanguageSEOContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
public abstract class MySqlMultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageSEOContentBase<TPrimaryKey>
where T : MultiLanguageSEOContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.MYSQL.Base
{
public abstract class MySqlMultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
public abstract class MySqlMultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, MySqlDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageUniqueNameContentBase<TPrimaryKey>
where T : MultiLanguageUniqueNameContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixConfigurationContentConfiguration : MySqlMultilanguageUniqueNameContentBaseConfiguration<MixConfigurationContent, int>
public class MixConfigurationContentConfiguration : MySqlMultiLanguageUniqueNameContentBaseConfiguration<MixConfigurationContent, int>
{
public override void Configure(EntityTypeBuilder<MixConfigurationContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixDataContentConfiguration : MySqlMultilanguageSEOContentBaseConfiguration<MixDataContent, Guid>
public class MixDataContentConfiguration : MySqlMultiLanguageSEOContentBaseConfiguration<MixDataContent, Guid>
{
public override void Configure(EntityTypeBuilder<MixDataContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixLanguageContentConfiguration : MySqlMultilanguageUniqueNameContentBaseConfiguration<MixLanguageContent, int>
public class MixLanguageContentConfiguration : MySqlMultiLanguageUniqueNameContentBaseConfiguration<MixLanguageContent, int>
{
public override void Configure(EntityTypeBuilder<MixLanguageContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixModuleContentConfiguration : MySqlMultilanguageSEOContentBaseConfiguration<MixModuleContent, int>
public class MixModuleContentConfiguration : MySqlMultiLanguageSEOContentBaseConfiguration<MixModuleContent, int>
{
public override void Configure(EntityTypeBuilder<MixModuleContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixPageContentConfiguration : MySqlMultilanguageSEOContentBaseConfiguration<MixPageContent, int>
public class MixPageContentConfiguration : MySqlMultiLanguageSEOContentBaseConfiguration<MixPageContent, int>
{
public override void Configure(EntityTypeBuilder<MixPageContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Mix.Database.EntityConfigurations.MYSQL
{
public class MixPostContentConfiguration : MySqlMultilanguageSEOContentBaseConfiguration<MixPostContent, int>
public class MixPostContentConfiguration : MySqlMultiLanguageSEOContentBaseConfiguration<MixPostContent, int>
{
public override void Configure(EntityTypeBuilder<MixPostContent> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public class MySqlDatabaseConstants : IDatabaseConstants

string IDatabaseConstants.Text => "text";

string IDatabaseConstants.GenerateUUID => "uuid()";
string IDatabaseConstants.GenerateUUID => "'uuid()'";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Mix.Database.EntityConfigurations.POSTGRES.Base
{
public abstract class PostgresMultilanguageContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
: MultiLanguageContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageContentBase<TPrimaryKey>
where T : MultiLanguageContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Mix.Database.EntityConfigurations.POSTGRES.Base
{
public abstract class PostgresMultilanguageSEOContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
: MultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageSEOContentBase<TPrimaryKey>
where T : MultiLanguageSEOContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Mix.Database.EntityConfigurations.POSTGRES.Base
{
public abstract class PostgresMultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
: MultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, PostgresDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageUniqueNameContentBase<TPrimaryKey>
where T : MultiLanguageUniqueNameContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Mix.Database.EntityConfigurations
{
public static class PropertuBuilderExtensions
public static class PropertyBuilderExtensions
{
public static PropertyBuilder<TPrimaryKey> HasDefaultValueIf<TPrimaryKey>(this PropertyBuilder<TPrimaryKey> builder, bool condition, string method)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.SQLITE.Base
{
public abstract class SqliteMultilanguageContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
public abstract class SqliteMultiLanguageContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageContentBase<TPrimaryKey>
where T : MultiLanguageContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.SQLITE.Base
{
public abstract class SqliteMultilanguageSEOContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageSEOContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
public abstract class SqliteMultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageSEOContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageSEOContentBase<TPrimaryKey>
where T : MultiLanguageSEOContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Mix.Database.EntityConfigurations.SQLITE.Base
{
public abstract class SqliteMultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey>
: MultilanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
public abstract class SqliteMultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey>
: MultiLanguageUniqueNameContentBaseConfiguration<T, TPrimaryKey, SqliteDatabaseConstants>
where TPrimaryKey : IComparable
where T : MultilanguageUniqueNameContentBase<TPrimaryKey>
where T : MultiLanguageUniqueNameContentBase<TPrimaryKey>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Mix.Database.EntityConfigurations.SQLITE
{
public class MixConfigurationContentConfiguration : SqliteMultilanguageUniqueNameContentBaseConfiguration<MixConfigurationContent, int>
public class MixConfigurationContentConfiguration : SqliteMultiLanguageUniqueNameContentBaseConfiguration<MixConfigurationContent, int>
{
public override void Configure(EntityTypeBuilder<MixConfigurationContent> builder)
{
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载