Adds the Database namespace

This commit is contained in:
Cyberboss
2020-01-18 21:11:51 -05:00
parent 284c6c393d
commit db341d43b3
65 changed files with 119 additions and 55 deletions
@@ -4,6 +4,7 @@ using Tgstation.Server.Host.Components.Byond;
using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Components.Chat.Commands
{
@@ -7,7 +7,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Components.Chat.Commands
{
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Models;
@@ -7,6 +7,7 @@ using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.StaticFiles;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Components
@@ -14,6 +14,7 @@ using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Components
@@ -109,7 +110,22 @@ namespace Tgstation.Server.Host.Components
/// <param name="eventConsumer">The value of <see cref="eventConsumer"/></param>
/// <param name="gitHubClientFactory">The value of <see cref="gitHubClientFactory"/></param>
/// <param name="logger">The value of <see cref="logger"/></param>
public Instance(Api.Models.Instance metadata, IRepositoryManager repositoryManager, IByondManager byondManager, IDreamMaker dreamMaker, IWatchdog watchdog, IChat chat, StaticFiles.IConfiguration configuration, ICompileJobConsumer compileJobConsumer, IDatabaseContextFactory databaseContextFactory, IDmbFactory dmbFactory, IJobManager jobManager, IEventConsumer eventConsumer, IGitHubClientFactory gitHubClientFactory, ILogger<Instance> logger)
public Instance(
Api.Models.Instance metadata,
IRepositoryManager repositoryManager,
IByondManager byondManager,
IDreamMaker dreamMaker,
IWatchdog watchdog,
IChat chat,
StaticFiles.IConfiguration
configuration,
ICompileJobConsumer compileJobConsumer,
IDatabaseContextFactory databaseContextFactory,
IDmbFactory dmbFactory,
IJobManager jobManager,
IEventConsumer eventConsumer,
IGitHubClientFactory gitHubClientFactory,
ILogger<Instance> logger)
{
this.metadata = metadata ?? throw new ArgumentNullException(nameof(metadata));
RepositoryManager = repositoryManager ?? throw new ArgumentNullException(nameof(repositoryManager));
@@ -10,6 +10,7 @@ using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Security;
using Tgstation.Server.Host.System;
@@ -7,6 +7,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
namespace Tgstation.Server.Host.Components
@@ -6,7 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Z.EntityFramework.Plus;
namespace Tgstation.Server.Host.Components
@@ -9,6 +9,7 @@ using Tgstation.Server.Api.Models.Internal;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Components.Watchdog
{
@@ -10,6 +10,7 @@ using Tgstation.Server.Api.Models.Internal;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Components.Watchdog
{
@@ -17,6 +17,7 @@ using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Components.Interop;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Extensions;
namespace Tgstation.Server.Host.Components.Watchdog
@@ -7,6 +7,7 @@ using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
namespace Tgstation.Server.Host.Components.Watchdog
@@ -8,6 +8,7 @@ using Tgstation.Server.Api.Models.Internal;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
namespace Tgstation.Server.Host.Components.Watchdog
@@ -73,20 +74,20 @@ namespace Tgstation.Server.Host.Components.Watchdog
DreamDaemonLaunchParameters initialLaunchParameters,
Api.Models.Instance instance, bool autoStart)
: base(
chat,
sessionControllerFactory,
dmbFactory,
reattachInfoHandler,
databaseContextFactory,
byondTopicSender,
eventConsumer,
jobManager,
serverControl,
asyncDelayer,
logger,
initialLaunchParameters,
instance,
autoStart)
chat,
sessionControllerFactory,
dmbFactory,
reattachInfoHandler,
databaseContextFactory,
byondTopicSender,
eventConsumer,
jobManager,
serverControl,
asyncDelayer,
logger,
initialLaunchParameters,
instance,
autoStart)
{
try
{
@@ -7,6 +7,7 @@ using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
namespace Tgstation.Server.Host.Components.Watchdog
@@ -41,13 +42,14 @@ namespace Tgstation.Server.Host.Components.Watchdog
IAsyncDelayer asyncDelayer,
ISymlinkFactory symlinkFactory,
IOptions<GeneralConfiguration> generalConfigurationOptions)
: base(serverControl,
loggerFactory,
databaseContextFactory,
byondTopicSender,
jobManager,
asyncDelayer,
generalConfigurationOptions)
: base(
serverControl,
loggerFactory,
databaseContextFactory,
byondTopicSender,
jobManager,
asyncDelayer,
generalConfigurationOptions)
{
this.symlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
}
@@ -4,7 +4,7 @@ using Newtonsoft.Json.Converters;
namespace Tgstation.Server.Host.Configuration
{
/// <summary>
/// Configuration options for the <see cref="Models.DatabaseContext{TParentContext}"/>
/// Configuration options for the <see cref="Database.DatabaseContext{TParentContext}"/>
/// </summary>
sealed class DatabaseConfiguration
{
@@ -15,9 +15,9 @@ using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Extensions;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
using Tgstation.Server.Host.System;
@@ -9,7 +9,7 @@ using System.Net;
using System.Threading.Tasks;
using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Controllers
@@ -10,6 +10,7 @@ using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -13,6 +13,7 @@ using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
using Z.EntityFramework.Plus;
@@ -10,6 +10,7 @@ using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -14,6 +14,7 @@ using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -12,6 +12,7 @@ using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -14,6 +14,7 @@ using System.Threading.Tasks;
using Tgstation.Server.Api;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
using Wangkanai.Detection;
@@ -16,6 +16,7 @@ using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
using Z.EntityFramework.Plus;
@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -17,6 +17,7 @@ using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -12,6 +12,7 @@ using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
@@ -75,7 +76,7 @@ namespace Tgstation.Server.Host.Controllers
/// <summary>
/// Attempt to change the password of a given <paramref name="dbUser"/>.
/// </summary>
/// <param name="dbUser">The <see cref="Models.User"/> to update.</param>
/// <param name="dbUser">The user to update.</param>
/// <param name="newPassword">The new password.</param>
/// <returns><see langword="null"/> on success, <see cref="BadRequestObjectResult"/> if <paramref name="newPassword"/> is too short.</returns>
BadRequestObjectResult TrySetPassword(Models.User dbUser, string newPassword)
@@ -32,9 +32,9 @@ using Tgstation.Server.Host.Components.Repository;
using Tgstation.Server.Host.Components.Watchdog;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Controllers;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Extensions;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
using Tgstation.Server.Host.System;
@@ -2,6 +2,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
@@ -14,6 +14,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.System;
@@ -4,7 +4,7 @@ using System.Data.Common;
using System.Data.SqlClient;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Database
{
/// <inheritdoc />
sealed class DatabaseConnectionFactory : IDatabaseConnectionFactory
@@ -10,9 +10,10 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Models.Migrations;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <inheritdoc />
#pragma warning disable CA1506 // TODO: Decomplexify
@@ -1,9 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Database
{
/// <inheritdoc />
sealed class DatabaseContextFactory : IDatabaseContextFactory
@@ -4,9 +4,10 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <inheritdoc />
sealed class DatabaseSeeder : IDatabaseSeeder
@@ -20,7 +21,10 @@ namespace Tgstation.Server.Host.Models
/// Construct a <see cref="DatabaseSeeder"/>
/// </summary>
/// <param name="cryptographySuite">The value of <see cref="cryptographySuite"/></param>
public DatabaseSeeder(ICryptographySuite cryptographySuite) => this.cryptographySuite = cryptographySuite ?? throw new ArgumentNullException(nameof(cryptographySuite));
public DatabaseSeeder(ICryptographySuite cryptographySuite)
{
this.cryptographySuite = cryptographySuite ?? throw new ArgumentNullException(nameof(cryptographySuite));
}
/// <summary>
/// Add a default admin <see cref="User"/> to a given <paramref name="databaseContext"/>
@@ -30,9 +34,9 @@ namespace Tgstation.Server.Host.Models
{
var admin = new User
{
AdministrationRights = (AdministrationRights)~0U,
AdministrationRights = ~AdministrationRights.None,
CreatedAt = DateTimeOffset.Now,
InstanceManagerRights = (InstanceManagerRights)~0U,
InstanceManagerRights = ~InstanceManagerRights.None,
Name = Api.Models.User.AdminName,
CanonicalName = Api.Models.User.AdminName.ToUpperInvariant(),
Enabled = true,
@@ -4,7 +4,7 @@ using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.System;
namespace Tgstation.Server.Host.Models.Migrations
namespace Tgstation.Server.Host.Database.Design
{
/// <summary>
/// Contains helpers for creating design time <see cref="DatabaseContext{TParentContext}"/>s
@@ -2,9 +2,10 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Logging;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Models.Migrations
namespace Tgstation.Server.Host.Database.Design
{
/// <inheritdoc />
sealed class MySqlDesignTimeDbContextFactory : IDesignTimeDbContextFactory<MySqlDatabaseContext>
@@ -2,9 +2,10 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Logging;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Security;
namespace Tgstation.Server.Host.Models.Migrations
namespace Tgstation.Server.Host.Database.Design
{
/// <inheritdoc />
sealed class SqlServerDesignTimeDbContextFactory : IDesignTimeDbContextFactory<SqlServerDatabaseContext>
@@ -1,10 +1,10 @@
using System.Data.Common;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// For creating <see cref="DbConnection"/>
/// For creating raw <see cref="DbConnection"/>s.
/// </summary>
interface IDatabaseConnectionFactory
{
@@ -2,8 +2,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// Represents the database
@@ -51,7 +52,7 @@ namespace Tgstation.Server.Host.Models
DbSet<DreamDaemonSettings> DreamDaemonSettings { get; set; }
/// <summary>
/// The <see cref="Models.ChatBot"/> in the <see cref="IDatabaseContext"/>
/// The <see cref="ChatBot"/>s in the <see cref="IDatabaseContext"/>
/// </summary>
DbSet<ChatBot> ChatBots { get; set; }
@@ -66,12 +67,12 @@ namespace Tgstation.Server.Host.Models
DbSet<RepositorySettings> RepositorySettings { get; set; }
/// <summary>
/// The <see cref="DbSet{TEntity}"/> for <see cref="Models.ReattachInformation"/>s
/// The <see cref="DbSet{TEntity}"/> for <see cref="ReattachInformation"/>s
/// </summary>
DbSet<ReattachInformation> ReattachInformations { get; set; }
/// <summary>
/// The <see cref="DbSet{TEntity}"/> for <see cref="Models.WatchdogReattachInformation"/>s
/// The <see cref="DbSet{TEntity}"/> for <see cref="WatchdogReattachInformation"/>s
/// </summary>
DbSet<WatchdogReattachInformation> WatchdogReattachInformations { get; set; }
@@ -1,8 +1,7 @@
using System;
using System.Threading.Tasks;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// Factory for scoping usage of <see cref="IDatabaseContext"/>s. Meant for use by <see cref="Components"/>
@@ -1,7 +1,7 @@
using System.Threading;
using System.Threading.Tasks;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// For initially seeding a database
@@ -6,7 +6,7 @@ using Pomelo.EntityFrameworkCore.MySql.Infrastructure;
using System;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// <see cref="DatabaseContext{TParentContext}"/> for MySQL
@@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Models
namespace Tgstation.Server.Host.Database
{
/// <summary>
/// <see cref="DatabaseContext{TParentContext}"/> for Sqlserver
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -2,6 +2,7 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Models.Migrations
{
@@ -3,6 +3,7 @@ using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Security
@@ -9,7 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Api;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Host.Models;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Security
{
@@ -10,6 +10,7 @@ using Tgstation.Server.Api.Models.Internal;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Compiler;
using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
namespace Tgstation.Server.Host.Components.Watchdog.Tests
{
@@ -12,6 +12,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.System;
@@ -4,7 +4,7 @@ using System;
using System.Data.SqlClient;
using Tgstation.Server.Host.Configuration;
namespace Tgstation.Server.Host.Core.Tests
namespace Tgstation.Server.Host.Database.Tests
{
[TestClass]
public sealed class TestDatabaseConnectionFactory
@@ -5,7 +5,7 @@ using System;
using System.Threading.Tasks;
using Tgstation.Server.Host.Models;
namespace Tgstation.Server.Host.Core.Tests
namespace Tgstation.Server.Host.Database.Tests
{
[TestClass]
public sealed class TestDatabaseContextFactory