Skip to content

SQLite custom type support #4654

Answered by weiznich
etienneasln asked this question in Q&A
Jun 18, 2025 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

At the time of writing diesel print-schema (and any other subcommand of the CLI tool that emits the schema as table! macro) does not support this as it uses a hard coded list of types. You can find this list here:

pub fn determine_column_type(
conn: &mut SqliteConnection,
attr: &ColumnInformation,
table: &TableName,
primary_keys: &[String],
config: &PrintSchema,
) -> Result<ColumnType, crate::errors::Error> {
let mut type_name = attr.type_name.to_lowercase();
if type_name == "generated always" {
type_name.clear();
}
let path = if is_bool(&

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@etienneasln
Comment options

@etienneasln
Comment options

@weiznich
Comment options

@etienneasln
Comment options

Answer selected by etienneasln
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants