dotnet-ef migrations add LocationSharing

This commit is contained in:
Tsubasahane
2025-12-27 20:01:43 +08:00
parent 73363b9409
commit c8e28cdd64
3 changed files with 1384 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LightlessSyncServer.Migrations
{
/// <inheritdoc />
public partial class LocationSharing : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "share_location",
table: "user_permission_sets",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "share_location",
table: "group_pair_preferred_permissions",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "share_location",
table: "user_permission_sets");
migrationBuilder.DropColumn(
name: "share_location",
table: "group_pair_preferred_permissions");
}
}
}

View File

@@ -584,6 +584,10 @@ namespace LightlessSyncServer.Migrations
.HasColumnType("boolean")
.HasColumnName("is_paused");
b.Property<bool>("ShareLocation")
.HasColumnType("boolean")
.HasColumnName("share_location");
b.HasKey("UserUID", "GroupGID")
.HasName("pk_group_pair_preferred_permissions");
@@ -941,6 +945,10 @@ namespace LightlessSyncServer.Migrations
.HasColumnType("boolean")
.HasColumnName("is_paused");
b.Property<bool>("ShareLocation")
.HasColumnType("boolean")
.HasColumnName("share_location");
b.Property<bool>("Sticky")
.HasColumnType("boolean")
.HasColumnName("sticky");