Add disabling reaction pings
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
-- SCHEMA VERSION 4: 2020-02-14
|
||||
-- SCHEMA VERSION 5: 2020-02-14
|
||||
alter table servers add column log_cleanup_enabled bool not null default false;
|
||||
update info set schema_version = 5;
|
||||
3
PluralKit.Core/Migrations/6.sql
Executable file
3
PluralKit.Core/Migrations/6.sql
Executable file
@@ -0,0 +1,3 @@
|
||||
-- SCHEMA VERSION 6: 2020-03-21
|
||||
alter table systems add column pings bool not null default true;
|
||||
update info set schema_version = 6;
|
||||
@@ -17,11 +17,12 @@ namespace PluralKit.Core {
|
||||
[JsonIgnore] public string Token { get; set; }
|
||||
[JsonProperty("created")] public Instant Created { get; set; }
|
||||
[JsonProperty("tz")] public string UiTz { get; set; }
|
||||
public PrivacyLevel DescriptionPrivacy { get; set; }
|
||||
[JsonProperty("ping")] public bool Pings { get; set; }
|
||||
public PrivacyLevel DescriptionPrivacy { get; set; }
|
||||
public PrivacyLevel MemberListPrivacy { get; set; }
|
||||
public PrivacyLevel FrontPrivacy { get; set; }
|
||||
public PrivacyLevel FrontHistoryPrivacy { get; set; }
|
||||
|
||||
[JsonIgnore] public DateTimeZone Zone => DateTimeZoneProviders.Tzdb.GetZoneOrNull(UiTz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace PluralKit.Core {
|
||||
|
||||
public async Task SaveSystem(PKSystem system) {
|
||||
using (var conn = await _conn.Obtain())
|
||||
await conn.ExecuteAsync("update systems set name = @Name, description = @Description, tag = @Tag, avatar_url = @AvatarUrl, token = @Token, ui_tz = @UiTz, description_privacy = @DescriptionPrivacy, member_list_privacy = @MemberListPrivacy, front_privacy = @FrontPrivacy, front_history_privacy = @FrontHistoryPrivacy where id = @Id", system);
|
||||
await conn.ExecuteAsync("update systems set name = @Name, description = @Description, tag = @Tag, avatar_url = @AvatarUrl, token = @Token, ui_tz = @UiTz, description_privacy = @DescriptionPrivacy, member_list_privacy = @MemberListPrivacy, front_privacy = @FrontPrivacy, front_history_privacy = @FrontHistoryPrivacy, pings = @Pings where id = @Id", system);
|
||||
|
||||
_logger.Information("Updated system {@System}", system);
|
||||
await _cache.InvalidateSystem(system);
|
||||
|
||||
@@ -11,7 +11,7 @@ using Serilog;
|
||||
namespace PluralKit.Core {
|
||||
public class SchemaService
|
||||
{
|
||||
private const int TargetSchemaVersion = 5;
|
||||
private const int TargetSchemaVersion = 6;
|
||||
|
||||
private DbConnectionFactory _conn;
|
||||
private ILogger _logger;
|
||||
|
||||
Reference in New Issue
Block a user