Changes in database for tags to be array integers instead of strings
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LightlessSyncServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddAndChangeTagsUserGroupProfile : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int[]>(
|
||||
name: "tags",
|
||||
table: "user_profile_data",
|
||||
type: "integer[]",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int[]>(
|
||||
name: "tags",
|
||||
table: "group_profiles",
|
||||
type: "integer[]",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "tags",
|
||||
table: "user_profile_data");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "tags",
|
||||
table: "group_profiles",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int[]),
|
||||
oldType: "integer[]",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -605,8 +605,8 @@ namespace LightlessSyncServer.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("profile_disabled");
|
||||
|
||||
b.Property<string>("Tags")
|
||||
.HasColumnType("text")
|
||||
b.PrimitiveCollection<int[]>("Tags")
|
||||
.HasColumnType("integer[]")
|
||||
.HasColumnName("tags");
|
||||
|
||||
b.HasKey("GroupGID")
|
||||
@@ -840,6 +840,10 @@ namespace LightlessSyncServer.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("profile_disabled");
|
||||
|
||||
b.PrimitiveCollection<int[]>("Tags")
|
||||
.HasColumnType("integer[]")
|
||||
.HasColumnName("tags");
|
||||
|
||||
b.Property<string>("UserDescription")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("user_description");
|
||||
|
||||
@@ -13,7 +13,7 @@ public class GroupProfile
|
||||
public string GroupGID { get; set; }
|
||||
public Group Group { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public int[] Tags { get; set; }
|
||||
public string Base64GroupProfileImage { get; set; }
|
||||
public bool IsNSFW { get; set; } = false;
|
||||
public bool ProfileDisabled { get; set; } = false;
|
||||
|
||||
@@ -12,6 +12,7 @@ public class UserProfileData
|
||||
public User User { get; set; }
|
||||
|
||||
public string UserDescription { get; set; }
|
||||
public int[] Tags { get; set; }
|
||||
|
||||
[Required]
|
||||
[Key]
|
||||
|
||||
Reference in New Issue
Block a user