Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upsqlite3 foreign keys which don't name columns can't be inferred #1535
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
habnabit commentedFeb 4, 2018
•
edited
Setup
Versions
rustc 1.25.0-nightly (616b66dca 2018-02-02)diesel 1.1.0sqlite3 3.16.0 2016-11-04 19:09:39 0e5ffd9123d6d2d2b8f3701e8a73cc98a3a7ff5fFeature Flags
sqlite postgresProblem Description
Running
diesel print-schemafails, with very terse output:Steps to reproduce
This produces:
toisNULLbecauseREFERENCES data_centersdoesn't name any columns; it's implicitly the same asREFERENCES data_centers(id). I'm pretty sure this is due to thepragma_foreign_key_listpseudo-table doesn't expect aNULL.diesel/diesel_infer_schema/infer_schema_internals/src/sqlite.rs
Lines 27 to 38 in 07319d3
Checklist