I am good for now. I missed out the AbpZeroDbMigrator.cs. Do you have source code which only provides file that were changed in a particular release. That would make migration pretty easy
Hi Hilkan -
Thank you showing thr right direction. I always to the compare and upgrade, but the code has changed a lot with respect to migration where in Host and Tenant folder has been created. It is no where mentioned to get rid of the old files, though it's obvious but helps people like me who need more of guidance.
I am able to compile the code and now facing a different issue :
'XXXX.MultiTenancy.TenantManager' is waiting for the following dependencies:
I compare the code and it has all the required changes, but I am not sure what's causing this. This up gradation is a difficult one for existing users.
Quick help is appreciated.
Sorry to be impatient but a quick response is much appreciated. I am kind of in the middle of my upgrade and have spent quite some time to upgrade it and this is the last piece which is preventing me to compile it.
Here we go !!
I have started updating to latest Abp Zero you guys released today and below is my problem :
Error CS7036 There is no argument given that corresponds to the required formal parameter 'roleId' of 'UserRole.UserRole(int?, long, int)'
'DefaultLanguagesCreator' is an ambiguous reference between 'XXXXX.Migrations.Seed.Host.DefaultLanguagesCreator' and XXXXXX.Migrations.Seed.DefaultLanguagesCreator'
Please help.
Thanks Hilkan. Yes I have gone through the blog and pretty excited about the Hybrid model you are introducing. I originally planned to take this route but with the Abp limitation had cancelled it. But with this release I am really excited.
This is the most important update you guys are pushing out and I thank you for all the effort you and your team have put into this
I am using Organization as My Company. Also I want to implement something like RLS (Row Level Security) for each entity. So using Organization is not an option. I am looking into EFF Dynamic Filter and Predicate builder to achieve this. Will update this ticket with my findings. In case you have some idea please let me know.
When I say access to Entities that would mean certain rows in the Entities. The details of the entities and rows are being stored in Entity R
Thank You for considering this. You are the best
If we can create a property like "Notification" or "UserMessage" if Success is true then Application layer can set the property and send it to the controller/ view to display it. Default message could be "The Transaction is successfully saved" so that I can always use this property to notify.
Let me know your thoughts
namespace <<SOMENAME>>.<XXXX>>>.Migrations { using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure.Annotations; using System.Data.Entity.Migrations;
public partial class ForHilkan : DbMigration
{
public override void Up()
{
RenameTable(name: "dbo.<<SOMENAME>>_Roles", newName: "Roles");
RenameTable(name: "dbo.<<SOMENAME>>_Users", newName: "Users");
RenameTable(name: "dbo.<<SOMENAME>>_OrganizationUnits", newName: "OrganizationUnits");
RenameTable(name: "dbo.<<SOMENAME>>_UserLogins", newName: "UserLogins");
RenameTable(name: "dbo.<<SOMENAME>>_Permissions", newName: "Permissions");
RenameTable(name: "dbo.<<SOMENAME>>_UserRoles", newName: "UserRoles");
RenameTable(name: "dbo.<<SOMENAME>>_Settings", newName: "Settings");
RenameTable(name: "dbo.<<SOMENAME>>_Tenants", newName: "Tenants");
RenameTable(name: "dbo.<<SOMENAME>>_Editions", newName: "Editions");
RenameTable(name: "dbo.<<SOMENAME>>_AuditLogs", newName: "AuditLogs");
RenameTable(name: "dbo.<<SOMENAME>>_BackgroundJobs", newName: "BackgroundJobs");
RenameTable(name: "dbo.<<SOMENAME>>_Features", newName: "Features");
RenameTable(name: "dbo.<<SOMENAME>>_Languages", newName: "Languages");
RenameTable(name: "dbo.<<SOMENAME>>_LanguageTexts", newName: "LanguageTexts");
RenameTable(name: "dbo.<<SOMENAME>>_Notifications", newName: "Notifications");
RenameTable(name: "dbo.<<SOMENAME>>_NotificationSubscriptions", newName: "NotificationSubscriptions");
RenameTable(name: "dbo.<<SOMENAME>>_UserLoginAttempts", newName: "UserLoginAttempts");
RenameTable(name: "dbo.<<SOMENAME>>_UserNotifications", newName: "UserNotifications");
RenameTable(name: "dbo.<<SOMENAME>>_UserOrganizationUnits", newName: "UserOrganizationUnits");
MoveTable(name: "dbo.Roles", newSchema: "xxx");
MoveTable(name: "dbo.Users", newSchema: "xxx");
MoveTable(name: "dbo.OrganizationUnits", newSchema: "xxx");
MoveTable(name: "dbo.UserLogins", newSchema: "xxx");
MoveTable(name: "dbo.Permissions", newSchema: "xxx");
MoveTable(name: "dbo.UserRoles", newSchema: "xxx");
MoveTable(name: "dbo.Settings", newSchema: "xxx");
MoveTable(name: "dbo.Tenants", newSchema: "xxx");
MoveTable(name: "dbo.Editions", newSchema: "xxx");
MoveTable(name: "dbo.AuditLogs", newSchema: "xxx");
MoveTable(name: "dbo.BackgroundJobs", newSchema: "xxx");
MoveTable(name: "dbo.Features", newSchema: "xxx");
MoveTable(name: "dbo.Languages", newSchema: "xxx");
MoveTable(name: "dbo.LanguageTexts", newSchema: "xxx");
MoveTable(name: "dbo.Notifications", newSchema: "xxx");
MoveTable(name: "dbo.NotificationSubscriptions", newSchema: "xxx");
MoveTable(name: "dbo.UserLoginAttempts", newSchema: "xxx");
MoveTable(name: "dbo.UserNotifications", newSchema: "xxx");
MoveTable(name: "dbo.UserOrganizationUnits", newSchema: "xxx");
CreateTable(
"dbo.<<SOMENAME>>_OrganizationUnits",
c => new
{
Id = c.Long(nullable: false),
MyId = c.Int(),
},
annotations: new Dictionary<string, object>
{
{ "DynamicFilter_OrganizationExtended_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
{ "DynamicFilter_OrganizationExtended_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
})
.PrimaryKey(t => t.Id)
.ForeignKey("xxx.OrganizationUnits", t => t.Id)
.Index(t => t.Id);
AlterTableAnnotations(
"xxx.OrganizationUnits",
c => new
{
Id = c.Long(nullable: false, identity: true),
TenantId = c.Int(),
ParentId = c.Long(),
Code = c.String(nullable: false, maxLength: 128),
DisplayName = c.String(nullable: false, maxLength: 128),
IsDeleted = c.Boolean(nullable: false),
DeleterUserId = c.Long(),
DeletionTime = c.DateTime(),
LastModificationTime = c.DateTime(),
LastModifierUserId = c.Long(),
CreationTime = c.DateTime(nullable: false),
CreatorUserId = c.Long(),
},
annotations: new Dictionary<string, AnnotationValues>
{
{
"DynamicFilter_OrganizationExtended_MayHaveTenant",
new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
},
{
"DynamicFilter_OrganizationExtended_SoftDelete",
new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
},
});
DropColumn("xxx.OrganizationUnits", "MyId");
DropColumn("xxx.OrganizationUnits", "Discriminator");
}
public override void Down()
{
AddColumn("xxx.OrganizationUnits", "Discriminator", c => c.String(nullable: false, maxLength: 128));
AddColumn("xxx.OrganizationUnits", "MyId", c => c.Int());
DropForeignKey("dbo.<<SOMENAME>>_OrganizationUnits", "Id", "xxx.OrganizationUnits");
DropIndex("dbo.<<SOMENAME>>_OrganizationUnits", new[] { "Id" });
AlterTableAnnotations(
"xxx.OrganizationUnits",
c => new
{
Id = c.Long(nullable: false, identity: true),
TenantId = c.Int(),
ParentId = c.Long(),
Code = c.String(nullable: false, maxLength: 128),
DisplayName = c.String(nullable: false, maxLength: 128),
IsDeleted = c.Boolean(nullable: false),
DeleterUserId = c.Long(),
DeletionTime = c.DateTime(),
LastModificationTime = c.DateTime(),
LastModifierUserId = c.Long(),
CreationTime = c.DateTime(nullable: false),
CreatorUserId = c.Long(),
},
annotations: new Dictionary<string, AnnotationValues>
{
{
"DynamicFilter_OrganizationExtended_MayHaveTenant",
new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
},
{
"DynamicFilter_OrganizationExtended_SoftDelete",
new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
},
});
DropTable("dbo.<<SOMENAME>>_OrganizationUnits",
removedAnnotations: new Dictionary<string, object>
{
{ "DynamicFilter_OrganizationExtended_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
{ "DynamicFilter_OrganizationExtended_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
});
MoveTable(name: "xxx.UserOrganizationUnits", newSchema: "dbo");
MoveTable(name: "xxx.UserNotifications", newSchema: "dbo");
MoveTable(name: "xxx.UserLoginAttempts", newSchema: "dbo");
MoveTable(name: "xxx.NotificationSubscriptions", newSchema: "dbo");
MoveTable(name: "xxx.Notifications", newSchema: "dbo");
MoveTable(name: "xxx.LanguageTexts", newSchema: "dbo");
MoveTable(name: "xxx.Languages", newSchema: "dbo");
MoveTable(name: "xxx.Features", newSchema: "dbo");
MoveTable(name: "xxx.BackgroundJobs", newSchema: "dbo");
MoveTable(name: "xxx.AuditLogs", newSchema: "dbo");
MoveTable(name: "xxx.Editions", newSchema: "dbo");
MoveTable(name: "xxx.Tenants", newSchema: "dbo");
MoveTable(name: "xxx.Settings", newSchema: "dbo");
MoveTable(name: "xxx.UserRoles", newSchema: "dbo");
MoveTable(name: "xxx.Permissions", newSchema: "dbo");
MoveTable(name: "xxx.UserLogins", newSchema: "dbo");
MoveTable(name: "xxx.OrganizationUnits", newSchema: "dbo");
MoveTable(name: "xxx.Users", newSchema: "dbo");
MoveTable(name: "xxx.Roles", newSchema: "dbo");
RenameTable(name: "dbo.UserOrganizationUnits", newName: "<<SOMENAME>>_UserOrganizationUnits");
RenameTable(name: "dbo.UserNotifications", newName: "<<SOMENAME>>_UserNotifications");
RenameTable(name: "dbo.UserLoginAttempts", newName: "<<SOMENAME>>_UserLoginAttempts");
RenameTable(name: "dbo.NotificationSubscriptions", newName: "<<SOMENAME>>_NotificationSubscriptions");
RenameTable(name: "dbo.Notifications", newName: "<<SOMENAME>>_Notifications");
RenameTable(name: "dbo.LanguageTexts", newName: "<<SOMENAME>>_LanguageTexts");
RenameTable(name: "dbo.Languages", newName: "<<SOMENAME>>_Languages");
RenameTable(name: "dbo.Features", newName: "<<SOMENAME>>_Features");
RenameTable(name: "dbo.BackgroundJobs", newName: "<<SOMENAME>>_BackgroundJobs");
RenameTable(name: "dbo.AuditLogs", newName: "<<SOMENAME>>_AuditLogs");
RenameTable(name: "dbo.Editions", newName: "<<SOMENAME>>_Editions");
RenameTable(name: "dbo.Tenants", newName: "<<SOMENAME>>_Tenants");
RenameTable(name: "dbo.Settings", newName: "<<SOMENAME>>_Settings");
RenameTable(name: "dbo.UserRoles", newName: "<<SOMENAME>>_UserRoles");
RenameTable(name: "dbo.Permissions", newName: "<<SOMENAME>>_Permissions");
RenameTable(name: "dbo.UserLogins", newName: "<<SOMENAME>>_UserLogins");
RenameTable(name: "dbo.OrganizationUnits", newName: "<<SOMENAME>>_OrganizationUnits");
RenameTable(name: "dbo.Users", newName: "<<SOMENAME>>_Users");
RenameTable(name: "dbo.Roles", newName: "<<SOMENAME>>_Roles");
}
}
}