From e139ef183db79ba374e99ec580f03e40657003e3 Mon Sep 17 00:00:00 2001 From: vc-ci Date: Thu, 1 Feb 2024 07:31:42 +0000 Subject: [PATCH 1/3] 3.804.0 --- Directory.Build.props | 2 +- src/VirtoCommerce.CoreModule.Web/module.manifest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8cc5bf9e..346fc896 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.803.0 + 3.804.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.CoreModule.Web/module.manifest b/src/VirtoCommerce.CoreModule.Web/module.manifest index f345a624..8e8e3493 100644 --- a/src/VirtoCommerce.CoreModule.Web/module.manifest +++ b/src/VirtoCommerce.CoreModule.Web/module.manifest @@ -1,7 +1,7 @@ VirtoCommerce.Core - 3.803.0 + 3.804.0 3.800.0 Commerce core module From 81577ab07c977106a09730bd8646d9bd86e95bad Mon Sep 17 00:00:00 2001 From: vc-ci Date: Fri, 9 Feb 2024 09:51:30 +0000 Subject: [PATCH 2/3] ci: Auto update Github Action workflows --- .github/workflows/module-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index be974857..413fa82f 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -1,4 +1,4 @@ -# v3.800.0 +# v3.800.1 name: Module CI on: @@ -127,7 +127,7 @@ jobs: run: vc-build Compress -skip Clean+Restore+Compile+Test - name: Publish Nuget - if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name != 'workflow_dispatch' }} + if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'workflow_dispatch' }} uses: VirtoCommerce/vc-github-actions/publish-nuget@master - name: Publish to Blob From 1a55861ac3131f58d19c8b017924e5305e4a3ac4 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Mon, 12 Feb 2024 12:05:21 +0200 Subject: [PATCH 3/3] VCST-463: Error column name xmin conflicts with a system column name (#224) fix: Error column name xmin conflicts with a system column name on postgresql --- .../Readme.md | 29 ++-- ...0240126111303_UpdateRowVersion.Designer.cs | 147 ------------------ .../20240126111303_UpdateRowVersion.cs | 50 ------ .../Readme.md | 30 ++-- 4 files changed, 24 insertions(+), 232 deletions(-) delete mode 100644 src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.Designer.cs delete mode 100644 src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.cs diff --git a/src/VirtoCommerce.CoreModule.Data.MySql/Readme.md b/src/VirtoCommerce.CoreModule.Data.MySql/Readme.md index e2476ad3..437dc81f 100644 --- a/src/VirtoCommerce.CoreModule.Data.MySql/Readme.md +++ b/src/VirtoCommerce.CoreModule.Data.MySql/Readme.md @@ -1,24 +1,19 @@ +# Generate Migrations -## Package manager -Add-Migration Initial -Context VirtoCommerce.CoreModule.Data.Repositories.CoreDbContext -Verbose -OutputDir Migrations -Project VirtoCommerce.CoreModule.Data.MySql -StartupProject VirtoCommerce.CoreModule.Data.MySql -Debug - - - -### Entity Framework Core Commands -``` -dotnet tool install --global dotnet-ef --version 6.* +## Install CLI tools for Entity Framework Core +```cmd +dotnet tool install --global dotnet-ef --version 8.0.0 ``` -**Generate Migrations** +or update +```cmd +dotnet tool update --global dotnet-ef --version 8.0.0 ``` -dotnet ef migrations add Initial -- "{connection string}" -dotnet ef migrations add Update1 -- "{connection string}" -dotnet ef migrations add Update2 -- "{connection string}" -``` - -etc.. -**Apply Migrations** +## Add Migration +Select Data. folder and run following command for each provider: -`dotnet ef database update -- "{connection string}"` +```cmd +dotnet ef migrations add +``` diff --git a/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.Designer.cs b/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.Designer.cs deleted file mode 100644 index 50c098ab..00000000 --- a/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.Designer.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using VirtoCommerce.CoreModule.Data.Repositories; - -#nullable disable - -namespace VirtoCommerce.CoreModule.Data.PostgreSql.Migrations -{ - [DbContext(typeof(CoreDbContext))] - [Migration("20240126111303_UpdateRowVersion")] - partial class UpdateRowVersion - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("VirtoCommerce.CoreModule.Data.Currency.CurrencyEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.Property("CreatedBy") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CreatedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("CustomFormatting") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ExchangeRate") - .HasColumnType("Money"); - - b.Property("IsPrimary") - .HasColumnType("boolean"); - - b.Property("MidpointRounding") - .HasMaxLength(18) - .HasColumnType("character varying(18)"); - - b.Property("ModifiedBy") - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ModifiedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RoundingType") - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.Property("Symbol") - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .HasDatabaseName("IX_Code"); - - b.ToTable("Currency", (string)null); - }); - - modelBuilder.Entity("VirtoCommerce.CoreModule.Data.Model.SequenceEntity", b => - { - b.Property("ObjectType") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ModifiedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("RowVersion") - .IsConcurrencyToken() - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("xid") - .HasColumnName("xmin"); - - b.Property("Value") - .HasColumnType("integer"); - - b.HasKey("ObjectType"); - - b.ToTable("Sequence", (string)null); - }); - - modelBuilder.Entity("VirtoCommerce.CoreModule.Data.Package.PackageTypeEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Height") - .HasPrecision(18, 4) - .HasColumnType("numeric(18,4)"); - - b.Property("Length") - .HasPrecision(18, 4) - .HasColumnType("numeric(18,4)"); - - b.Property("MeasureUnit") - .HasMaxLength(16) - .HasColumnType("character varying(16)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(254) - .HasColumnType("character varying(254)"); - - b.Property("Width") - .HasPrecision(18, 4) - .HasColumnType("numeric(18,4)"); - - b.HasKey("Id"); - - b.ToTable("PackageType", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.cs b/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.cs deleted file mode 100644 index 1810c208..00000000 --- a/src/VirtoCommerce.CoreModule.Data.PostgreSql/Migrations/20240126111303_UpdateRowVersion.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace VirtoCommerce.CoreModule.Data.PostgreSql.Migrations -{ - /// - public partial class UpdateRowVersion : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "RowVersion", - table: "Sequence", - newName: "xmin"); - - migrationBuilder.AlterColumn( - name: "xmin", - table: "Sequence", - type: "xid", - rowVersion: true, - nullable: true, - oldClrType: typeof(byte[]), - oldType: "bytea", - oldRowVersion: true, - oldNullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "xmin", - table: "Sequence", - newName: "RowVersion"); - - migrationBuilder.AlterColumn( - name: "RowVersion", - table: "Sequence", - type: "bytea", - rowVersion: true, - nullable: true, - oldClrType: typeof(uint), - oldType: "xid", - oldRowVersion: true, - oldNullable: true); - } - } -} diff --git a/src/VirtoCommerce.CoreModule.Data.SqlServer/Readme.md b/src/VirtoCommerce.CoreModule.Data.SqlServer/Readme.md index caf00041..437dc81f 100644 --- a/src/VirtoCommerce.CoreModule.Data.SqlServer/Readme.md +++ b/src/VirtoCommerce.CoreModule.Data.SqlServer/Readme.md @@ -1,25 +1,19 @@ +# Generate Migrations -## Package manager -Add-Migration Initial -Context VirtoCommerce.CoreModule.Data.Repositories.CoreDbContext -Verbose -OutputDir Migrations -Project VirtoCommerce.CoreModule.Data.SqlServer -StartupProject VirtoCommerce.CoreModule.Data.SqlServer -Debug - - - -### Entity Framework Core Commands -``` - -dotnet tool install --global dotnet-ef --version 6.* +## Install CLI tools for Entity Framework Core +```cmd +dotnet tool install --global dotnet-ef --version 8.0.0 ``` -**Generate Migrations** +or update -``` -dotnet ef migrations add Initial -- "{connection string}" -dotnet ef migrations add Update1 -- "{connection string}" -dotnet ef migrations add Update2 -- "{connection string}" +```cmd +dotnet tool update --global dotnet-ef --version 8.0.0 ``` -etc.. +## Add Migration +Select Data. folder and run following command for each provider: -**Apply Migrations** - -`dotnet ef database update -- "{connection string}"` +```cmd +dotnet ef migrations add +```