tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IDatabaseContext.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
5using Microsoft.EntityFrameworkCore;
6using Microsoft.Extensions.Logging;
7
10
12{
16 public interface IDatabaseContext
17 {
22
27
32
37
42
47
52
57
62
67
72
77
82
87
92
97
102
108 Task Save(CancellationToken cancellationToken);
109
115 Task Drop(CancellationToken cancellationToken);
116
123 ValueTask<bool> Migrate(ILogger<DatabaseContext> logger, CancellationToken cancellationToken);
124
134 ILogger<DatabaseContext> logger,
135 Version targetVersion,
136 DatabaseType currentDatabaseType,
137 CancellationToken cancellationToken);
138 }
139}
IDatabaseCollection< InstancePermissionSet > InstancePermissionSets
The InstancePermissionSets in the IDatabaseContext.
IDatabaseCollection< PermissionSet > PermissionSets
The DbSet<TEntity> for PermissionSets.
IDatabaseCollection< ChatChannel > ChatChannels
The ChatChannel in the IDatabaseContext.
ValueTask< bool > Migrate(ILogger< DatabaseContext > logger, CancellationToken cancellationToken)
Creates and migrates the IDatabaseContext.
ValueTask SchemaDowngradeForServerVersion(ILogger< DatabaseContext > logger, Version targetVersion, DatabaseType currentDatabaseType, CancellationToken cancellationToken)
Attempt to downgrade the schema to the migration used for a given server targetVersion .
IDatabaseCollection< Job > Jobs
The Jobs in the IDatabaseContext.
IDatabaseCollection< RevisionInformation > RevisionInformations
The RevisionInformations in the IDatabaseContext.
Task Drop(CancellationToken cancellationToken)
Attempts to delete all tables and drop the database in use.
IDatabaseCollection< TestMerge > TestMerges
The TestMerges in the IDatabaseContext.
Task Save(CancellationToken cancellationToken)
Saves changes made to the IDatabaseContext.
IDatabaseCollection< UserGroup > Groups
The DbSet<TEntity> for UserGroups.
IDatabaseCollection< User > Users
The Users in the IDatabaseContext.
IDatabaseCollection< CompileJob > CompileJobs
The CompileJobs in the IDatabaseContext.
IDatabaseCollection< ReattachInformation > ReattachInformations
The DbSet<TEntity> for ReattachInformations.
IDatabaseCollection< OAuthConnection > OAuthConnections
The DbSet<TEntity> for OAuthConnections.
IDatabaseCollection< RevInfoTestMerge > RevInfoTestMerges
The RevInfoTestMerges in the IDatabaseContext.
IDatabaseCollection< ChatBot > ChatBots
The ChatBots in the IDatabaseContext.
IDatabaseCollection< Instance > Instances
The Instances in the IDatabaseContext.
DatabaseType
Type of database to user.