payloadLifespan/payloadLifetime and other name variants unified to Time To Live naming.
This commit is contained in:
@ -3,11 +3,12 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Nullable>disable</Nullable>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
123
code/MessengerApi.Db.Npg/Migrations/20250705145537_RenameTtlColumn.Designer.cs
generated
Normal file
123
code/MessengerApi.Db.Npg/Migrations/20250705145537_RenameTtlColumn.Designer.cs
generated
Normal file
@ -0,0 +1,123 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using MessengerApi.Db.Npg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MessengerApi.Db.Npg.Migrations
|
||||
{
|
||||
[DbContext(typeof(MessengerNpgDbContext))]
|
||||
[Migration("20250705145537_RenameTtlColumn")]
|
||||
partial class RenameTtlColumn
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.6")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("MessengerApi.Db.Entities.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("CreatedUtc")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<Guid>("FromId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("IsAcknowledged")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<bool>("IsDelivered")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PayloadType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TimeToLiveInSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<Guid>("ToId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ToId", "IsDelivered");
|
||||
|
||||
b.ToTable("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MessengerApi.Db.Entities.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ApiKey")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MessengerApi.Db.Entities.UserRoute", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("FromId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("ToId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FromId");
|
||||
|
||||
b.HasIndex("ToId");
|
||||
|
||||
b.ToTable("UserRoutes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MessengerApi.Db.Entities.UserRoute", b =>
|
||||
{
|
||||
b.HasOne("MessengerApi.Db.Entities.User", "From")
|
||||
.WithMany()
|
||||
.HasForeignKey("FromId");
|
||||
|
||||
b.HasOne("MessengerApi.Db.Entities.User", "To")
|
||||
.WithMany()
|
||||
.HasForeignKey("ToId");
|
||||
|
||||
b.Navigation("From");
|
||||
|
||||
b.Navigation("To");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MessengerApi.Db.Npg.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RenameTtlColumn : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "PayloadLifespanInSeconds",
|
||||
table: "Messages",
|
||||
newName: "TimeToLiveInSeconds");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TimeToLiveInSeconds",
|
||||
table: "Messages",
|
||||
newName: "PayloadLifespanInSeconds");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -43,12 +43,12 @@ namespace MessengerApi.Db.Npg.Migrations
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("PayloadLifespanInSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("PayloadType")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TimeToLiveInSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<Guid>("ToId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user