0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-01 02:52:56 +00:00

fix: Switch from nvarchar to varchar

This commit is contained in:
alex289 2024-08-16 20:23:11 +02:00
parent 56cad93f08
commit 591f9ccaae
No known key found for this signature in database
GPG Key ID: 573F77CD2D87F863
10 changed files with 12 additions and 12 deletions

View File

@ -19,6 +19,6 @@
"Port": 5672, "Port": 5672,
"Username": "guest", "Username": "guest",
"Password": "guest", "Password": "guest",
"Enabled": "True" "Enabled": "False"
} }
} }

View File

@ -20,6 +20,6 @@ public sealed class StoredDomainEventConfiguration : IEntityTypeConfiguration<St
builder.Property(c => c.User) builder.Property(c => c.User)
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
} }
} }

View File

@ -32,7 +32,7 @@ public sealed class StoredDomainNotificationConfiguration : IEntityTypeConfigura
builder.Property(c => c.CorrelationId) builder.Property(c => c.CorrelationId)
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
builder.Ignore(c => c.Data); builder.Ignore(c => c.Data);

View File

@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb
{ {
[DbContext(typeof(DomainNotificationStoreDbContext))] [DbContext(typeof(DomainNotificationStoreDbContext))]
[Migration("20240816164320_AddDomainNotificationStore")] [Migration("20240816181502_AddDomainNotificationStore")]
partial class AddDomainNotificationStore partial class AddDomainNotificationStore
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -42,7 +42,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb
b.Property<string>("CorrelationId") b.Property<string>("CorrelationId")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
b.Property<string>("Key") b.Property<string>("Key")
.IsRequired() .IsRequired()

View File

@ -18,7 +18,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb
Id = table.Column<Guid>(type: "uuid", nullable: false), Id = table.Column<Guid>(type: "uuid", nullable: false),
Data = table.Column<string>(type: "text", nullable: false), Data = table.Column<string>(type: "text", nullable: false),
User = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false), User = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
CorrelationId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false), CorrelationId = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false),
AggregateId = table.Column<Guid>(type: "uuid", nullable: false), AggregateId = table.Column<Guid>(type: "uuid", nullable: false),
MessageType = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false), MessageType = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), Timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),

View File

@ -39,7 +39,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.DomainNotificationStoreDb
b.Property<string>("CorrelationId") b.Property<string>("CorrelationId")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
b.Property<string>("Key") b.Property<string>("Key")
.IsRequired() .IsRequired()

View File

@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace CleanArchitecture.Infrastructure.Migrations.EventStoreDb namespace CleanArchitecture.Infrastructure.Migrations.EventStoreDb
{ {
[DbContext(typeof(EventStoreDbContext))] [DbContext(typeof(EventStoreDbContext))]
[Migration("20240816164232_AddEventStore")] [Migration("20240816181514_AddEventStore")]
partial class AddEventStore partial class AddEventStore
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -55,7 +55,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.EventStoreDb
b.Property<string>("User") b.Property<string>("User")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
b.HasKey("Id"); b.HasKey("Id");

View File

@ -17,7 +17,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.EventStoreDb
{ {
Id = table.Column<Guid>(type: "uuid", nullable: false), Id = table.Column<Guid>(type: "uuid", nullable: false),
Data = table.Column<string>(type: "text", nullable: false), Data = table.Column<string>(type: "text", nullable: false),
User = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false), User = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false),
CorrelationId = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false), CorrelationId = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
AggregateId = table.Column<Guid>(type: "uuid", nullable: false), AggregateId = table.Column<Guid>(type: "uuid", nullable: false),
Action = table.Column<string>(type: "varchar(100)", nullable: false), Action = table.Column<string>(type: "varchar(100)", nullable: false),

View File

@ -52,7 +52,7 @@ namespace CleanArchitecture.Infrastructure.Migrations.EventStoreDb
b.Property<string>("User") b.Property<string>("User")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("varchar(100)");
b.HasKey("Id"); b.HasKey("Id");

View File

@ -38,7 +38,7 @@ internal class GlobalSetupFixture
DatabaseConnectionString = DatabaseContainer DatabaseConnectionString = DatabaseContainer
.GetConnectionString() .GetConnectionString()
.Replace("Database=master", $"Database=clean-architecture-{Guid.NewGuid()}"); .Replace("Database=postgres", $"Database=clean-architecture-{Guid.NewGuid()}");
} }
[OneTimeTearDown] [OneTimeTearDown]