Compare commits

...

2 Commits

Author SHA1 Message Date
Tsubasahane
c8e28cdd64 dotnet-ef migrations add LocationSharing 2025-12-27 20:01:43 +08:00
Tsubasahane
73363b9409 Update LightlessAPI 2025-12-27 19:54:12 +08:00
4 changed files with 1385 additions and 1 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");