37 ArgumentNullException.ThrowIfNull(options);
38 ArgumentNullException.ThrowIfNull(databaseConfiguration);
41 throw new InvalidOperationException($
"Invalid DatabaseType for {nameof(MySqlDatabaseContext)}!");
43 ServerVersion serverVersion;
44 if (!String.IsNullOrEmpty(databaseConfiguration.
ServerVersion))
46 serverVersion = ServerVersion.Parse(
53 serverVersion = ServerVersion.AutoDetect(databaseConfiguration.
ConnectionString);
60 mySqlOptions.EnableRetryOnFailure();
61 mySqlOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SingleQuery);
68 base.OnModelCreating(modelBuilder);
74 .MapMySqlTextField<ChatChannel>(x => x.Tag)
76 .MapMySqlTextField<CompileJob>(x => x.EngineVersion)
78 .MapMySqlTextField<CompileJob>(x => x.Output)
79 .MapMySqlTextField<
CompileJob>(x => x.RepositoryOrigin)
80 .MapMySqlTextField<DreamDaemonSettings>(x => x.AdditionalParameters)
82 .MapMySqlTextField<Instance>(x => x.
Name)
83 .MapMySqlTextField<
Instance>(x => x.Path)
84 .MapMySqlTextField<Instance>(x => x.SwarmIdentifer)
85 .MapMySqlTextField<
Job>(x => x.Description)
86 .MapMySqlTextField<Job>(x => x.ExceptionDetails)
88 .MapMySqlTextField<ReattachInformation>(x => x.AccessIdentifier)
90 .MapMySqlTextField<RepositorySettings>(x => x.AccessUser)
92 .MapMySqlTextField<RepositorySettings>(x => x.CommitterName)
94 .MapMySqlTextField<RevisionInformation>(x => x.OriginCommitSha)
95 .MapMySqlTextField<
TestMerge>(x => x.Author)
96 .MapMySqlTextField<TestMerge>(x => x.BodyAtMerge)
97 .MapMySqlTextField<
TestMerge>(x => x.Comment)
98 .MapMySqlTextField<TestMerge>(x => x.TargetCommitSha)
99 .MapMySqlTextField<
TestMerge>(x => x.TitleAtMerge)
100 .MapMySqlTextField<TestMerge>(x => x.Url)
101 .MapMySqlTextField<
User>(x => x.CanonicalName)
102 .MapMySqlTextField<User>(x => x.
Name)
103 .MapMySqlTextField<
User>(x => x.PasswordHash)
104 .MapMySqlTextField<User>(x => x.SystemIdentifier)