pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<tfoot id='pNhmX'></tfoot>
    • <bdo id='pNhmX'></bdo><ul id='pNhmX'></ul>

        <small id='pNhmX'></small><noframes id='pNhmX'>

        <i id='pNhmX'><tr id='pNhmX'><dt id='pNhmX'><q id='pNhmX'><span id='pNhmX'><b id='pNhmX'><form id='pNhmX'><ins id='pNhmX'></ins><ul id='pNhmX'></ul><sub id='pNhmX'></sub></form><legend id='pNhmX'></legend><bdo id='pNhmX'><pre id='pNhmX'><center id='pNhmX'></center></pre></bdo></b><th id='pNhmX'></th></span></q></dt></tr></i><div class="juiwj7n" id='pNhmX'><tfoot id='pNhmX'></tfoot><dl id='pNhmX'><fieldset id='pNhmX'></fieldset></dl></div>
      1. <legend id='pNhmX'><style id='pNhmX'><dir id='pNhmX'><q id='pNhmX'></q></dir></style></legend>

        在不同的 TFS 分支上工作時(shí)丟失 EF 代碼優(yōu)先遷移

        Lose EF Code First Migration when working on different TFS branches?(在不同的 TFS 分支上工作時(shí)丟失 EF 代碼優(yōu)先遷移?)
        <tfoot id='66Osi'></tfoot>

            <tbody id='66Osi'></tbody>
            • <i id='66Osi'><tr id='66Osi'><dt id='66Osi'><q id='66Osi'><span id='66Osi'><b id='66Osi'><form id='66Osi'><ins id='66Osi'></ins><ul id='66Osi'></ul><sub id='66Osi'></sub></form><legend id='66Osi'></legend><bdo id='66Osi'><pre id='66Osi'><center id='66Osi'></center></pre></bdo></b><th id='66Osi'></th></span></q></dt></tr></i><div class="k8mbwba" id='66Osi'><tfoot id='66Osi'></tfoot><dl id='66Osi'><fieldset id='66Osi'></fieldset></dl></div>
              • <bdo id='66Osi'></bdo><ul id='66Osi'></ul>
                1. <small id='66Osi'></small><noframes id='66Osi'>

                  <legend id='66Osi'><style id='66Osi'><dir id='66Osi'><q id='66Osi'></q></dir></style></legend>
                2. 本文介紹了在不同的 TFS 分支上工作時(shí)丟失 EF 代碼優(yōu)先遷移?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我們正在使用 TFS,并且我們的 Dev 有不同的分支.

                  We are using TFS and have different branches for our Dev.

                  1. 在分支 A 中,我們進(jìn)行了遷移以更改列大小

                  1. in the branch A we made a migration to change a column size

                  在分支 B 中,我們進(jìn)行了遷移以添加新表.這個(gè)分支不知道分支A的修改!!

                  in the branch B we made a migration to add a new table. This branch doesn not know about the branch A modification !!

                  兩個(gè)修改都合并到主分支.

                  both modification are merged to the main branch.

                  當(dāng)我更新數(shù)據(jù)庫(kù)時(shí),它會(huì)進(jìn)行 2 次遷移,但最后告訴我有待處理的更改.如果我執(zhí)行添加遷移,它會(huì)創(chuàng)建與第一次遷移相同的遷移(在分支 A 中).

                  When I do an update database, it does the 2 migration but at the end tells me there is pending changes. If I do an Add-Migration, it creates the same as the 1st migration (in branch A).

                  無(wú)法更新數(shù)據(jù)庫(kù)以匹配當(dāng)前模型,因?yàn)橛写幚砀暮妥詣?dòng)遷移被禁用.要么寫(xiě)掛起的模型更改基于代碼的遷移或啟用自動(dòng)遷移.放DbMigrationsConfiguration.AutomaticMigrationsEnabled 為 true 以啟用自動(dòng)移民.您可以使用 Add-Migration 命令將掛起的模型更改寫(xiě)入基于代碼的遷移.

                  Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration. You can use the Add-Migration command to write the pending model changes to a code-based migration.

                  是否因?yàn)槲疑洗芜w移的屬性 Target de IMigrationMetadata 的內(nèi)容中缺少某些內(nèi)容,因?yàn)樗恢赖谝淮芜w移?

                  Is it because something is missing in the content of the property Target de IMigrationMetadata of my last migration since it didn't know about the 1st one ?

                  是否可以在不同的 TFS 分支中處理遷移?

                  Is it possible to handle migrations in different TFS branches?

                  推薦答案

                  EF 遷移步驟包含一個(gè)元數(shù)據(jù)文件,該文件具有模型簽名,該簽名是遷移步驟的結(jié)果.合并時(shí)的問(wèn)題是在分支 B 中完成的遷移的簽名不包括在分支 A 中的遷移中完成的內(nèi)容.只要遷移在分支中,這是正確的.合并時(shí)會(huì)出錯(cuò).

                  An EF migration step contains a metadata file, that has a signature of the model that is the result of the migration step. The problem when merging is that the signature of the migration done in branch B doesn't include the stuff done in the migration in branch A. As long as the migrations are in the branches, this is correct. When merging it becomes wrong.

                  要解決這個(gè)問(wèn)題,您必須使用

                  To remedy it, you have to regenerate the meta-data of the latter migration with

                  add-migration MyMigrationName
                  

                  在沒(méi)有 -force 參數(shù)的現(xiàn)有遷移上運(yùn)行 add-migration 將僅重新生成元數(shù)據(jù).

                  Running add-migration on an existing migration without the -force parameter will regenerate just the metadata.

                  我在 中寫(xiě)了一篇關(guān)于合并場(chǎng)景的深入演練EF 遷移和合并沖突 在我的博客上發(fā)布.

                  I wrote an in depth walk-through of a merging scenario in the EF Migrations and a Merge Conflict post on my blog.

                  這篇關(guān)于在不同的 TFS 分支上工作時(shí)丟失 EF 代碼優(yōu)先遷移?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)
                  Adding OnClick event to ASP.NET control(將 OnClick 事件添加到 ASP.NET 控件)
                  Multiple submit Button click problem?(多個(gè)提交按鈕點(diǎn)擊問(wèn)題?)
                3. <tfoot id='2cXiD'></tfoot>
                      <i id='2cXiD'><tr id='2cXiD'><dt id='2cXiD'><q id='2cXiD'><span id='2cXiD'><b id='2cXiD'><form id='2cXiD'><ins id='2cXiD'></ins><ul id='2cXiD'></ul><sub id='2cXiD'></sub></form><legend id='2cXiD'></legend><bdo id='2cXiD'><pre id='2cXiD'><center id='2cXiD'></center></pre></bdo></b><th id='2cXiD'></th></span></q></dt></tr></i><div class="31z3e3d" id='2cXiD'><tfoot id='2cXiD'></tfoot><dl id='2cXiD'><fieldset id='2cXiD'></fieldset></dl></div>
                        <bdo id='2cXiD'></bdo><ul id='2cXiD'></ul>
                          <legend id='2cXiD'><style id='2cXiD'><dir id='2cXiD'><q id='2cXiD'></q></dir></style></legend>
                            <tbody id='2cXiD'></tbody>

                            <small id='2cXiD'></small><noframes id='2cXiD'>

                          1. 主站蜘蛛池模板: 西安微信朋友圈广告投放_微信朋友圈推广_西安度娘网络科技有限公司 | 刘秘书_你身边专业的工作范文写作小秘书 | 光伏家 - 太阳能光伏发电_分布式光伏发电_太阳能光伏网 | b2b网站大全,b2b网站排名,找b2b网站就上地球网 | 知企服务-企业综合服务(ZiKeys.com)-品优低价、种类齐全、过程管理透明、速度快捷高效、放心服务,知企专家! | 厂厂乐-汇聚海量采购信息的B2B微营销平台-厂厂乐官网 | 电梯装饰-北京万达中意电梯装饰有限公司| 储能预警-储能消防系统-电池舱自动灭火装置-四川千页科技股份有限公司官网 | 穿线管|波纹穿线管|包塑金属软管|蛇皮管?闵彬专注弱电工程? | 智慧农业|农业物联网|现代农业物联网-托普云农物联网官方网站 | 广州各区危化证办理_危险化学品经营许可证代办 | Honsberg流量计-Greisinger真空表-气压计-上海欧臻机电设备有限公司 | 水厂污泥地磅|污泥处理地磅厂家|地磅无人值守称重系统升级改造|地磅自动称重系统维修-河南成辉电子科技有限公司 | 培训中心-翰香原香酥板栗饼加盟店总部-正宗板栗酥饼技术 | 布袋除尘器|除尘器设备|除尘布袋|除尘设备_诺和环保设备 | 保温杯,儿童婴童奶瓶,运动水壶「广告礼品杯定制厂家」超朗保温杯壶 | 亚克隆,RNAi干扰检测,miRNA定量检测-上海基屹生物科技有限公司 | 安徽泰科检测科技有限公司【官方网站】| 炉门刀边腹板,焦化设备配件,焦化焦炉设备_沧州瑞创机械制造有限公司 | 云南成考网_云南成人高考报名网| 手机存放柜,超市储物柜,电子储物柜,自动寄存柜,行李寄存柜,自动存包柜,条码存包柜-上海天琪实业有限公司 | 地磅-地秤-江阴/无锡地磅-江阴天亿计量设备有限公司_ | 断桥铝破碎机_铝合金破碎机_废铁金属破碎机-河南鑫世昌机械制造有限公司 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 橡胶电子拉力机-塑料-微电脑电子拉力试验机厂家-江苏天源 | 家庭教育吧-在线家庭教育平台,专注青少年家庭教育 | 智能交通网_智能交通系统_ITS_交通监控_卫星导航_智能交通行业 | 超声骨密度仪,双能X射线骨密度仪【起草单位】,骨密度检测仪厂家 - 品源医疗(江苏)有限公司 | 商秀—企业短视频代运营_抖音企业号托管 | 专业甜品培训学校_广东糖水培训_奶茶培训_特色小吃培训_广州烘趣甜品培训机构 | 控显科技 - 工控一体机、工业显示器、工业平板电脑源头厂家 | 英思科GTD-3000EX(美国英思科气体检测仪MX4MX6)百科-北京嘉华众信科技有限公司 | 电杆荷载挠度测试仪-电杆荷载位移-管桩测试仪-北京绿野创能机电设备有限公司 | 钢制暖气片散热器_天津钢制暖气片_卡麦罗散热器厂家 | 不锈钢钢格栅板_热浸锌钢格板_镀锌钢格栅板_钢格栅盖板-格美瑞 | 冷藏车厂家|冷藏车价格|小型冷藏车|散装饲料车厂家|程力专用汽车股份有限公司销售十二分公司 | 深圳宣传片制作_产品视频制作_深圳3D动画制作公司_深圳短视频拍摄-深圳市西典映画传媒有限公司 | 威客电竞(vk·game)·电子竞技赛事官网 | 印刷人才网 印刷、包装、造纸,中国80%的印刷企业人才招聘选印刷人才网! | 自动化改造_智虎机器人_灌装机_贴标机-上海圣起包装机械 | 深圳货架厂_仓库货架公司_重型仓储货架_线棒货架批发-深圳市诺普泰仓储设备有限公司 |