当前位置:Gxlcms > 数据库问题 > ZKWebFramework数据库迁移流程

ZKWebFramework数据库迁移流程

时间:2021-07-01 10:21:17 帮助过:2人阅读

比如:Common_User Common_UserRole等

 

  CreateTable(
                "dbo.Common_User",
                c => new
                    {
                        Id = c.Long(nullable: false, identity: true),
                        Username = c.String(nullable: false),
                        Nickname = c.String(nullable: false),
                        Password = c.String(nullable: false),
                        CreateTime = c.DateTime(nullable: false),
                        DeleteState = c.Int(nullable: false),
                        Role_Id = c.Long(),
                        Remark = c.String(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Common_UserRole", t => t.Role_Id)
                .Index(t => t.Username, unique: true, name: "INDEX_Username")
                .Index(t => t.Role_Id);
            
            CreateTable(
                "dbo.Common_UserRole",
                c => new
                    {
                        Id = c.Long(nullable: false, identity: true),
                        Name = c.String(nullable: false),
                        PrivilegesContent = c.String(nullable: false),
                        CreateTime = c.DateTime(nullable: false),
                        LastUpdated = c.DateTime(nullable: false),
                        Remark = c.String(),
                    })
                .PrimaryKey(t => t.Id);

 

 

            DropTable("dbo.Common_UserRole");
            DropTable("dbo.Common_User");

 

ZKWebFramework数据库迁移流程

标签:

人气教程排行