Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Upgrading from 0.10.3.1 issues #3469


User avatar
0
kythor created

I'm in thr process of upgrading my application up to version 1.0.0.0 at the moment. But I'm a bit puzzled now, because the folder structure from 0.11.0.0 has completly changed. simple things like CustomDtoMapper.cs does not exist anymore? but the Mapper.CreateMap is throwing an error...

I want to upgrade step by step, now to 0.11.0.0, then to v0.11.0.2,... and so on.

any advise?


6 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Your problem might be related to this one <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1166#issuecomment-240413435">https://github.com/aspnetboilerplate/as ... -240413435</a>.

    Unfortunately, there is no straight way of doing this. You can check breaking changes in <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/releases">https://github.com/aspnetboilerplate/as ... e/releases</a> and <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/releases">https://github.com/aspnetboilerplate/mo ... o/releases</a>

    and blog posts in our company website <a class="postlink" href="https://volosoft.com/blog/">https://volosoft.com/blog/</a>.

    If you cannot find a solution when you face a problem, we are always here to help :).

    Thanks.

  • User Avatar
    0
    kythor created

    I have upgraded to version 1.0.0.0 and succesfully rebuild the solution. I needed to create a new migration, which includes:

    CreateTable(
                    "dbo.AbpUserClaims",
                    c => new
                        {
                            Id = c.Long(nullable: false, identity: true),
                            TenantId = c.Int(),
                            UserId = c.Long(nullable: false),
                            ClaimType = c.String(),
                            ClaimValue = c.String(),
                            CreationTime = c.DateTime(nullable: false),
                            CreatorUserId = c.Long(),
                        },
                    annotations: new Dictionary<string, object>
                    {
                        { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                    })
                    .PrimaryKey(t => t.Id)
                    .ForeignKey("dbo.AbpUsers", t => t.UserId, cascadeDelete: true)
                    .Index(t => t.UserId);
                
                AddColumn("dbo.AbpUsers", "LockoutEndDateUtc", c => c.DateTime());
                AddColumn("dbo.AbpUsers", "AccessFailedCount", c => c.Int(nullable: false));
                AddColumn("dbo.AbpUsers", "IsLockoutEnabled", c => c.Boolean(nullable: false));
                AddColumn("dbo.AbpUsers", "PhoneNumber", c => c.String());
                AddColumn("dbo.AbpUsers", "IsPhoneNumberConfirmed", c => c.Boolean(nullable: false));
                AddColumn("dbo.AbpUsers", "SecurityStamp", c => c.String());
                AddColumn("dbo.AbpUsers", "IsTwoFactorEnabled", c => c.Boolean(nullable: false));
                AlterColumn("dbo.AbpOrganizationUnits", "Code", c => c.String(nullable: false, maxLength: 95));
    

    Now I want to upgrade my databases, but I get the following error when executing the migration:

    An error Occured during migration of host database.
    SQLException : The Index 'IX_TenantId_Code' is dependant on column 'Code'
    ALTER TABLE ALTER COLUM failed because one or more objects access this column
    

    any help would be appreciated.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It is probably the same problem with this one #1751@3aeade5d-2b3c-4764-a1fb-3b1bf7f25a7e

    Thanks.

  • User Avatar
    0
    kythor created

    where can I find this:

    Please see this migration <a class="postlink" href="https://github.com/aspnetzero/aspnet-ze">https://github.com/aspnetzero/aspnet-ze</a> ... _0_11_2.cs

    the link does not work anymore...

  • User Avatar
    0
    kythor created

    never mind, found it here <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/releases/tag/v0.11.2.0">https://github.com/aspnetboilerplate/mo ... /v0.11.2.0</a>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This is the content of migration:

    public override void Up()
    {
        DropIndex("dbo.AbpOrganizationUnits", new[] { "TenantId", "Code" });
        AlterColumn("dbo.AbpOrganizationUnits", "Code", c => c.String(nullable: false, maxLength: 95));
        CreateIndex("dbo.AbpOrganizationUnits", new[] { "TenantId", "Code" });
    }
    
    public override void Down()
    {
        DropIndex("dbo.AbpOrganizationUnits", new[] { "TenantId", "Code" });
        AlterColumn("dbo.AbpOrganizationUnits", "Code", c => c.String(nullable: false, maxLength: 128));
        CreateIndex("dbo.AbpOrganizationUnits", new[] { "TenantId", "Code" });
    }
    

    Thanks