Comments (5)
This does not sound like a FluentMigrator issue. It sounds like a coding issue where you are trying to cast in C# from long
to double?
. You mentioned Dapper twice, so I wonder if its really a Dapper issue. I'm not sure what code you wrote to achieve this exception, so I am closing this issue as not reproducible.
from fluentmigrator.
If you want to customize data types per database, one workaround would be to use the IfDatabase clause to customize logic per database tag.
from fluentmigrator.
I do this:
using var trans = await dest.BeginTransactionAsync(tks.Token);
await dest.DeleteAllAsync<Asset>(trans);
var copied = await dest.InsertAsync(await source.GetAllAsync<Asset>(), trans);
await trans.CommitAsync(tks.Token);
Then i get:
DataException: Error parsing column 49 (TrailingAnnualDividendRate=0 - Int64)
InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Nullable`1[System.Double]'.
The datatype must be a double (REAL), but used is NUMERIC, which is INT64 & REAL (double) at the same time depending on the value stored in the table.
I do not cast. Dapper evaluates the value, which is INT64 but want write a double and doesn't cast.
I just just changed all NUMERICs to REAL and it works. It's indeed an issue of FluentMigrator, because it generates the DDL!
Regards
Martin
from fluentmigrator.
Used is indeed a REAL, but why is standing there a NUMERIC?
Hm...
from fluentmigrator.
Found the issue! M$!
Microsoft.Data.Sqlite
Holy shit!
from fluentmigrator.
Related Issues (20)
- How to get rid of "Description:" in every column description? HOT 4
- Can no longer create foreign key on SQLite with FluentMigrator.Runner 5.2.0 HOT 7
- Unhandled exception. System.TypeLoadException: Could not load type 'FluentMigrator.Runner.Constraints.MigrationConstraintAttribute'
- Creating a MySql 8 Table with CurrentUTCDateTime Causes MySQL Syntax Error HOT 4
- AsBoolean() creates INTEGER column instead of Boolean/BIT on SQLite HOT 14
- Creating PrimaryKeys constraint get different constraint names HOT 3
- Request to add a fluent entity existence check to entity creation and deletion statements HOT 1
- The test method "CanCreateIndexWithVacuumCleanupIndexScaleFactor" fails in the master branch HOT 1
- We need MongoDB support for at least a minimal subset of migration operations
- SqlServer Runner - "StackOverflowException Operation Caused a stack overflow" HOT 2
- Is it possible to create an automatic table with fluentmigrator? HOT 5
- More options when creating tables needed HOT 1
- RawSql.Insert cannot be used as entire Where clause or Set clause in UpdateDataExpression/DeleteDataExpression
- Registering custom IVersionTableMetaData must be done after AddFluentMigratorCore HOT 9
- Aspire example code
- Do not hardcode date when updating `VersionInfo` table HOT 3
- Some tests fail if culture is different from en-US HOT 6
- Migrate database SqlServer and DotNet 8 HOT 4
- FluentMigrator creates two equivalent indices for SQLite
- Upgrade GitVersion.Tool
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentmigrator.