SQLite Migrations: Preserve column max length
See original GitHub issueCurrently, SQLite has a very trivial type mapping so string
properties are always mapped to TEXT
columns. We could preserve the HasMaxLength()
metadata in the database schema if we wanted. The column would map to something like TEXT(30)
. SQLite effectively ignores any length/precision/scale values, but we could still honor their semantics during reverse engineer.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
c# - Max length not applied in migration
I am using efcore.sqlserver 1.0.1 with preview2 tools - I have a string property which in sql server is created as an nvchar(max)...
Read more >Implementation Limits For SQLite
The maximum number of bytes in the text of an SQL statement is limited to SQLITE_MAX_SQL_LENGTH which defaults to 1,000,000,000. If an SQL...
Read more >Comparing VARCHAR(max) vs VARCHAR(n) data types in ...
This article gives an overview of varchar(max) data type and its comparison with the varchar(n) data type.
Read more >why are large sqlite transactions slow?
A column has a max BLOB size of 2Mib ( 1024 * 1024 * 2 bytes). Could someone explain to me what exactly...
Read more >Appendix: SQLite
The maximum size of a text or BLOB value is limited by a compile-time directive. The default limit is exactly one billion bytes,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AdamJachocki many users are successfully using migrations on Sqlite - you’re going to have to open a new issue and share your model and migration.
I have a model. Next, I create a migration using dotnet ef migrations add. Next I use Migrate() method on db context. That’s all.