EntityFramework 6.4.4 Code First "Update-Database -Script" 生成不完整 sql Oracle devart 驱动程序
EntityFramework 6.4.4 Code First "Update-Database -Script" generating incomplete sql Oracle devart driver
Update-Database -script 命令生成不完整的 sql。
奇怪的是 sql 丢失的输出被转储到程序包管理器控制台中。
示例迁移:
public partial class removePoprireData : DbMigration
{
public override void Up()
{
DropColumn("dbo.Poprire", "DataPoprire");
}
public override void Down()
{
AddColumn("dbo.Poprire", "DataPoprire", c => c.DateTime(nullable: false, precision: 7));
}
}
SqlQuery_1.sql 生成的文件只包含
ALTER TABLE Poprire
DROP COLUMN DataPoprire
/
DECLARE
包管理器控制台的内容是转储其余更新脚本内容的地方:
PM> Update-Database -Script
Applying explicit migrations: [202105181033173_removePoprireData].
Applying explicit migration: 202105181033173_removePoprireData.
BINARY_VALUE BLOB;
BEGIN
DBMS_LOB.CREATETEMPORARY(BINARY_VALUE, TRUE);
DBMS_LOB.APPEND(BINARY_VALUE, TO_BLOB(CAST('1F8B0800000000000400EDBDDB6E24B7B228F83EC0FC83D04F3307EBF4D5F6B20DFB1CA875F152EF6EB5B64AED359897422A8B92125D95593B2FEACB60BE6C1EE693E6178664DE9864F09649E6455D30D0562583C1886030182483C1FFEFFFF97FFFF89F5F77DBA34794665112FFF9ECD5F397CF8E501C269B28BEFFF35991DFFDF75F9FFDCFFFF1BFFE2F7F9C6D765F8FFEAEE1DE10385C33CEFE7CF690E7FBDF5FBCC8C207B40BB2E7BB284C932CB9CB9F87C9EE45B0495EBC7EF9F2B717AF5EBD4018C5338CEBE8E88FEB22CEA31DA23FF0CF93240ED13E2F82ED876483B659F51D97AC28D6A3CB6087B27D10A23F9F5D468FC1F3335C3DFF769EE2CF5F92F4F3B3A3E36D14605A56687BF7EC2888E3240F724CE9EF9F32B4CAD324BE5FEDF187607BF36D8F30DC5DB0CD50C5C1EF2DB829332F5F13665EB4156B546191E5C9CE12E1AB3795745EF0D57BC9F859233D2CBF5250846B2AC33F9F1D870471909EE51146966321F08DFE7EB24D49854AD4658F3CE7EBFDE388969E2429FEB3D60BAC3EE4BF7F1C9D14DBBC48D19F312AF234D8FEE3E8AAB8DD46E17FA06F37C96714FF1917DB2D4B27A61497753EE04F5769B24769FEED1ADD71D45F6C9E1DBDD08357C40622F81F2FF8F69AEA4053A5382EE2FCCDEB67479798F6E0768B1A2D7AA1C4C3D230048F75FDCBE031BAA73D2AE1ECD9D135DA5280EC21DA9783A7E9E7B5A828E769B2BB4EB60C0601687D13A4F728C794263AC85552A4A105D52D1D00D5B59095544B8104AAE59010D57FBC684799D1D8B31D73D38CB53E8346AFA40CCFAB1C33F4178A511AE4687315E4394A63820351C1E906C449BCAF1BC3261ECF57CF8E3E045FDFA3F83E7FF8F3193688788A3A8FBEA24DFDA9A2E0531CE1F90DD7CAD3423BEADE46FEDBB82C76E8722D884E5DE92A45719F7AC79B1465C135BA8F324C9B6DED9BA895396B2DE8774B83768DBE47A4AB031023533AD8D0294DC74083571B04BDC1AB8D8C2DF517D854A451A824BE8259B71646A49D8791DA6A01D0D65477754C23750E1692795765E512EFC259CB9B54471654233DD5C8906AD49B6A322964FB24AEC60A4434154B070ED613059CA82B2A605B7DB988EF12BC04C88330073960CA41CAA172816210C896526AAAD5AA5181001A51DA79A92294C5B6FD5FCF036AA25A2880AE662A9192D640D85257ABF54D1AC4DFB1E4A308A4530043603F2BC084EE56C1DAF6FA0A85C4227E0FD2E86D0CBBCD2D08C22020F512108172199C13D7B3994CEC3CD0AADAC11185DA72B552AC5576289EB17CD67E1EEB0FE171BA77D664B659EAD5B99BD2EA26A4335B07404BA9C779AE6E4235DDF1305A7A074F7E4624AB7C491E464BB2D29B349E334AEBF177B02D8C7709992A87B9026AAB92A65B' AS LONG RAW)));
**Lot of irrelevant blob content removed for easy reading**
TO_BLOB(CAST('73E2C9047CC25C15ECA2AEA01046EFC0175542D9D2589B248875241A311DACA188848A9E1906308AD970196C8A0CB7AE45772D3DA736AA3789E0AE85A36B4D8A5E7BA1558F3B6B264500CAA569ED66EFA575EA4FAE18D44C8EBA07EDE7CFA0226C47F56E7BF774BA679CCE08EC99F800460F95CFB827750F6D032C5BBDCDDD6104CA254CD9E916284421CF0DCCE2E9141B8B883CE64D8374EAF7A09BB23F5E94C97CAB0FF827B648C13DC23D8EB619FDFAC78BEB02D7DEA1F2D729CAA2FB16C51F18678CE879458BB486212998EAC8298EA21AA42EAECF56F0FCB509F2E038CDA3BB20245BE021C2FE12719468BC061E42BB5BB4B9883F16F9BEC831CB6877BBFDC60A833CA7AD6AFF8F1702CD7F7C2CD315BB600193196116D0C7F86D116D370DDDE7C136E3E618190AF24EF75F087F2FFB92ACF5D0FDB706D365121B22AAC4D73C2F7E8315678B91651FE355F088FAD086C73439E30F49481C39A04CE548F41DD115FB1FA751709F06BBACC2D1D6C73FB10E6F765FFFC7FF0F1E52F9A56E5D0600' AS LONG RAW)));
INSERT INTO MigrationHistory__ (MigrationId, ContextKey, Model, ProductVersion) VALUES ('202105181033173_removePoprireData', 'Niva', BINARY_VALUE, '6.4.4');
END;
PM>
有什么解决办法吗?用于工作正常。在 visual studio 2017 年和 2019 年
出现
这是一个简单的示例,但更复杂的迁移会在生成的 sql 文件和程序包管理器控制台之间拆分文本部分,并且很难以正确的方式组合在一起。
我正在为 entity framework
使用 Devart Dotconnect for Oracle 驱动程序
感谢您的报告。我们已重现该问题,并会在问题解决后通知您。
Update-Database -script 命令生成不完整的 sql。
奇怪的是 sql 丢失的输出被转储到程序包管理器控制台中。
示例迁移:
public partial class removePoprireData : DbMigration
{
public override void Up()
{
DropColumn("dbo.Poprire", "DataPoprire");
}
public override void Down()
{
AddColumn("dbo.Poprire", "DataPoprire", c => c.DateTime(nullable: false, precision: 7));
}
}
SqlQuery_1.sql 生成的文件只包含
ALTER TABLE Poprire
DROP COLUMN DataPoprire
/
DECLARE
包管理器控制台的内容是转储其余更新脚本内容的地方:
PM> Update-Database -Script
Applying explicit migrations: [202105181033173_removePoprireData].
Applying explicit migration: 202105181033173_removePoprireData.
BINARY_VALUE BLOB;
BEGIN
DBMS_LOB.CREATETEMPORARY(BINARY_VALUE, TRUE);
DBMS_LOB.APPEND(BINARY_VALUE, TO_BLOB(CAST('1F8B0800000000000400EDBDDB6E24B7B228F83EC0FC83D04F3307EBF4D5F6B20DFB1CA875F152EF6EB5B64AED359897422A8B92125D95593B2FEACB60BE6C1EE693E6178664DE9864F09649E6455D30D0562583C1886030182483C1FFEFFFF97FFFF89F5F77DBA34794665112FFF9ECD5F397CF8E501C269B28BEFFF35991DFFDF75F9FFDCFFFF1BFFE2F7F9C6D765F8FFEAEE1DE10385C33CEFE7CF690E7FBDF5FBCC8C207B40BB2E7BB284C932CB9CB9F87C9EE45B0495EBC7EF9F2B717AF5EBD4018C5338CEBE8E88FEB22CEA31DA23FF0CF93240ED13E2F82ED876483B659F51D97AC28D6A3CB6087B27D10A23F9F5D468FC1F3335C3DFF769EE2CF5F92F4F3B3A3E36D14605A56687BF7EC2888E3240F724CE9EF9F32B4CAD324BE5FEDF187607BF36D8F30DC5DB0CD50C5C1EF2DB829332F5F13665EB4156B546191E5C9CE12E1AB3795745EF0D57BC9F859233D2CBF5250846B2AC33F9F1D870471909EE51146966321F08DFE7EB24D49854AD4658F3CE7EBFDE388969E2429FEB3D60BAC3EE4BF7F1C9D14DBBC48D19F312AF234D8FEE3E8AAB8DD46E17FA06F37C96714FF1917DB2D4B27A61497753EE04F5769B24769FEED1ADD71D45F6C9E1DBDD08357C40622F81F2FF8F69AEA4053A5382EE2FCCDEB67479798F6E0768B1A2D7AA1C4C3D230048F75FDCBE031BAA73D2AE1ECD9D135DA5280EC21DA9783A7E9E7B5A828E769B2BB4EB60C0601687D13A4F728C794263AC85552A4A105D52D1D00D5B59095544B8104AAE59010D57FBC684799D1D8B31D73D38CB53E8346AFA40CCFAB1C33F4178A511AE4687315E4394A63820351C1E906C449BCAF1BC3261ECF57CF8E3E045FDFA3F83E7FF8F3193688788A3A8FBEA24DFDA9A2E0531CE1F90DD7CAD3423BEADE46FEDBB82C76E8722D884E5DE92A45719F7AC79B1465C135BA8F324C9B6DED9BA895396B2DE8774B83768DBE47A4AB031023533AD8D0294DC74083571B04BDC1AB8D8C2DF517D854A451A824BE8259B71646A49D8791DA6A01D0D65477754C23750E1692795765E512EFC259CB9B54471654233DD5C8906AD49B6A322964FB24AEC60A4434154B070ED613059CA82B2A605B7DB988EF12BC04C88330073960CA41CAA172816210C896526AAAD5AA5181001A51DA79A92294C5B6FD5FCF036AA25A2880AE662A9192D640D85257ABF54D1AC4DFB1E4A308A4530043603F2BC084EE56C1DAF6FA0A85C4227E0FD2E86D0CBBCD2D08C22020F512108172199C13D7B3994CEC3CD0AADAC11185DA72B552AC5576289EB17CD67E1EEB0FE171BA77D664B659EAD5B99BD2EA26A4335B07404BA9C779AE6E4235DDF1305A7A074F7E4624AB7C491E464BB2D29B349E334AEBF177B02D8C7709992A87B9026AAB92A65B' AS LONG RAW)));
**Lot of irrelevant blob content removed for easy reading**
TO_BLOB(CAST('73E2C9047CC25C15ECA2AEA01046EFC0175542D9D2589B248875241A311DACA188848A9E1906308AD970196C8A0CB7AE45772D3DA736AA3789E0AE85A36B4D8A5E7BA1558F3B6B264500CAA569ED66EFA575EA4FAE18D44C8EBA07EDE7CFA0226C47F56E7BF774BA679CCE08EC99F800460F95CFB827750F6D032C5BBDCDDD6104CA254CD9E916284421CF0DCCE2E9141B8B883CE64D8374EAF7A09BB23F5E94C97CAB0FF827B648C13DC23D8EB619FDFAC78BEB02D7DEA1F2D729CAA2FB16C51F18678CE879458BB486212998EAC8298EA21AA42EAECF56F0FCB509F2E038CDA3BB20245BE021C2FE12719468BC061E42BB5BB4B9883F16F9BEC831CB6877BBFDC60A833CA7AD6AFF8F1702CD7F7C2CD315BB600193196116D0C7F86D116D370DDDE7C136E3E618190AF24EF75F087F2FFB92ACF5D0FDB706D365121B22AAC4D73C2F7E8315678B91651FE355F088FAD086C73439E30F49481C39A04CE548F41DD115FB1FA751709F06BBACC2D1D6C73FB10E6F765FFFC7FF0F1E52F9A56E5D0600' AS LONG RAW)));
INSERT INTO MigrationHistory__ (MigrationId, ContextKey, Model, ProductVersion) VALUES ('202105181033173_removePoprireData', 'Niva', BINARY_VALUE, '6.4.4');
END;
PM>
有什么解决办法吗?用于工作正常。在 visual studio 2017 年和 2019 年
出现这是一个简单的示例,但更复杂的迁移会在生成的 sql 文件和程序包管理器控制台之间拆分文本部分,并且很难以正确的方式组合在一起。
我正在为 entity framework
使用 Devart Dotconnect for Oracle 驱动程序感谢您的报告。我们已重现该问题,并会在问题解决后通知您。