SeaQL / SeaQL/sea-orm

date_text type used in SQLite not consistently understood by tooling

Open
#3,102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.9k
Forks
734
Avg merge
6h 36m
Merged PRs (30d)
8

Description

After fighting this issue for a while, AI helped me write the following:

For SQLite, SeaORM schema sync maps Rust Date to a column type named date_text. SQLite accepts this, but E.G. JetBrains database table editor interprets this type as numeric and rejects ISO date text like 2026-07-01 with “invalid number”.

Since SQLite has no native date type and SeaORM stores dates as text, generated SQLite DDL should preferably use TEXT for Date, or provide a way to override the physical SQLite column type while preserving Rust Date conversion.

create table hooks
(
    id           integer   not null
        primary key,
    period_begin date_text not null,
    period_end   date_text not null
);

And the value that works via SQL but fails in the grid editor:

sql
INSERT INTO hooks (id, period_begin, period_end)
VALUES (1, '2026-01-01', '2026-07-01');

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating SeaORM's SQLite schema-sync type mapping for Rust Date and inspect how it produces date_text in generated DDL. Confirm the intended behavior with the hooks example, then ensure generated date columns use a tooling-compatible text representation or that a physical type override is supported while Rust Date conversion remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.