migration

This commit is contained in:
Paul Schneider 2026-07-06 03:17:23 +01:00
commit 89aa2bc37d
6 changed files with 354 additions and 92 deletions

View file

@ -12,8 +12,8 @@ using Yavsc.Models;
namespace Yavsc.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20260704154837_moderatedActivities")]
partial class moderatedActivities
[Migration("20260706013420_activityModerated")]
partial class activityModerated
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -1921,9 +1921,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -1944,9 +1941,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -1966,7 +1960,7 @@ namespace Yavsc.Migrations
b.Property<long>("PrestationId")
.HasColumnType("bigint");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<string>("SelectedProfileUserId")
@ -2011,9 +2005,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -2031,9 +2022,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -2050,7 +2038,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<int>("Status")
@ -2655,7 +2643,7 @@ namespace Yavsc.Migrations
b.HasKey("UserId");
b.ToTable("GeneralSettings");
b.ToTable("MusicLoverSettings");
});
modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b =>
@ -3094,9 +3082,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -3114,9 +3099,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -3136,7 +3118,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<string>("Reason")
@ -3243,9 +3225,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -3263,9 +3242,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -3286,7 +3262,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<int>("Status")
@ -3988,7 +3964,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4018,7 +3994,7 @@ namespace Yavsc.Migrations
b.Navigation("Prestation");
b.Navigation("Regularisation");
b.Navigation("Regularization");
b.Navigation("SelectedProfile");
});
@ -4041,7 +4017,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4059,7 +4035,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b =>
@ -4414,7 +4390,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4432,7 +4408,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
});
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
@ -4474,7 +4450,7 @@ namespace Yavsc.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4490,7 +4466,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
b.Navigation("Repository");
});

View file

@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class moderatedActivities : Migration
public partial class activityModerated : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@ -16,6 +16,51 @@ namespace Yavsc.Migrations
name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId",
table: "MusicalPreference");
migrationBuilder.DropTable(
name: "GeneralSettings");
migrationBuilder.DropColumn(
name: "Accepted",
table: "RdvQueries");
migrationBuilder.DropColumn(
name: "Decided",
table: "RdvQueries");
migrationBuilder.DropColumn(
name: "Accepted",
table: "Project");
migrationBuilder.DropColumn(
name: "Decided",
table: "Project");
migrationBuilder.DropColumn(
name: "Accepted",
table: "HairMultiCutQueries");
migrationBuilder.DropColumn(
name: "Decided",
table: "HairMultiCutQueries");
migrationBuilder.DropColumn(
name: "Accepted",
table: "HairCutQueries");
migrationBuilder.DropColumn(
name: "Decided",
table: "HairCutQueries");
migrationBuilder.RenameColumn(
name: "Previsional",
table: "RdvQueries",
newName: "Provisional");
migrationBuilder.RenameColumn(
name: "Previsional",
table: "Project",
newName: "Provisional");
migrationBuilder.RenameColumn(
name: "GeneralSettingsUserId",
table: "MusicalPreference",
@ -26,6 +71,16 @@ namespace Yavsc.Migrations
table: "MusicalPreference",
newName: "IX_MusicalPreference_MusicLoverSettingsUserId");
migrationBuilder.RenameColumn(
name: "Previsional",
table: "HairMultiCutQueries",
newName: "Provisional");
migrationBuilder.RenameColumn(
name: "Previsional",
table: "HairCutQueries",
newName: "Provisional");
migrationBuilder.AlterColumn<string>(
name: "Description",
table: "Bug",
@ -43,6 +98,17 @@ namespace Yavsc.Migrations
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "MusicLoverSettings",
columns: table => new
{
UserId = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MusicLoverSettings", x => x.UserId);
});
migrationBuilder.CreateTable(
name: "Signatures",
columns: table => new
@ -86,10 +152,10 @@ namespace Yavsc.Migrations
column: "SignerId");
migrationBuilder.AddForeignKey(
name: "FK_MusicalPreference_GeneralSettings_MusicLoverSettingsUserId",
name: "FK_MusicalPreference_MusicLoverSettings_MusicLoverSettingsUser~",
table: "MusicalPreference",
column: "MusicLoverSettingsUserId",
principalTable: "GeneralSettings",
principalTable: "MusicLoverSettings",
principalColumn: "UserId");
}
@ -97,9 +163,12 @@ namespace Yavsc.Migrations
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_MusicalPreference_GeneralSettings_MusicLoverSettingsUserId",
name: "FK_MusicalPreference_MusicLoverSettings_MusicLoverSettingsUser~",
table: "MusicalPreference");
migrationBuilder.DropTable(
name: "MusicLoverSettings");
migrationBuilder.DropTable(
name: "Signatures");
@ -107,6 +176,16 @@ namespace Yavsc.Migrations
name: "Moderated",
table: "Activities");
migrationBuilder.RenameColumn(
name: "Provisional",
table: "RdvQueries",
newName: "Previsional");
migrationBuilder.RenameColumn(
name: "Provisional",
table: "Project",
newName: "Previsional");
migrationBuilder.RenameColumn(
name: "MusicLoverSettingsUserId",
table: "MusicalPreference",
@ -117,6 +196,72 @@ namespace Yavsc.Migrations
table: "MusicalPreference",
newName: "IX_MusicalPreference_GeneralSettingsUserId");
migrationBuilder.RenameColumn(
name: "Provisional",
table: "HairMultiCutQueries",
newName: "Previsional");
migrationBuilder.RenameColumn(
name: "Provisional",
table: "HairCutQueries",
newName: "Previsional");
migrationBuilder.AddColumn<bool>(
name: "Accepted",
table: "RdvQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Decided",
table: "RdvQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Accepted",
table: "Project",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Decided",
table: "Project",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Accepted",
table: "HairMultiCutQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Decided",
table: "HairMultiCutQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Accepted",
table: "HairCutQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Decided",
table: "HairCutQueries",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AlterColumn<string>(
name: "Description",
table: "Bug",
@ -127,6 +272,17 @@ namespace Yavsc.Migrations
oldMaxLength: 10240,
oldNullable: true);
migrationBuilder.CreateTable(
name: "GeneralSettings",
columns: table => new
{
UserId = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GeneralSettings", x => x.UserId);
});
migrationBuilder.AddForeignKey(
name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId",
table: "MusicalPreference",

View file

@ -1918,9 +1918,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -1941,9 +1938,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -1963,7 +1957,7 @@ namespace Yavsc.Migrations
b.Property<long>("PrestationId")
.HasColumnType("bigint");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<string>("SelectedProfileUserId")
@ -2008,9 +2002,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -2028,9 +2019,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -2047,7 +2035,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<int>("Status")
@ -2652,7 +2640,7 @@ namespace Yavsc.Migrations
b.HasKey("UserId");
b.ToTable("GeneralSettings");
b.ToTable("MusicLoverSettings");
});
modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b =>
@ -3091,9 +3079,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -3111,9 +3096,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -3133,7 +3115,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<string>("Reason")
@ -3240,9 +3222,6 @@ namespace Yavsc.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<bool>("Accepted")
.HasColumnType("boolean");
b.Property<string>("ActivityCode")
.IsRequired()
.HasColumnType("text");
@ -3260,9 +3239,6 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified")
.HasColumnType("timestamp with time zone");
b.Property<bool>("Decided")
.HasColumnType("boolean");
b.Property<string>("Description")
.HasColumnType("text");
@ -3283,7 +3259,7 @@ namespace Yavsc.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<decimal?>("Previsional")
b.Property<decimal?>("Provisional")
.HasColumnType("numeric");
b.Property<int>("Status")
@ -3985,7 +3961,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4015,7 +3991,7 @@ namespace Yavsc.Migrations
b.Navigation("Prestation");
b.Navigation("Regularisation");
b.Navigation("Regularization");
b.Navigation("SelectedProfile");
});
@ -4038,7 +4014,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4056,7 +4032,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b =>
@ -4411,7 +4387,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4429,7 +4405,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
});
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
@ -4471,7 +4447,7 @@ namespace Yavsc.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularisation")
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
.WithMany()
.HasForeignKey("PaymentId");
@ -4487,7 +4463,7 @@ namespace Yavsc.Migrations
b.Navigation("PerformerProfile");
b.Navigation("Regularisation");
b.Navigation("Regularization");
b.Navigation("Repository");
});