Replies: 1 comment
-
I'm happy to accept a PR for that as long as:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
sqlite tables always have a
rowid
,oid
and_rowid_
, even when not specifyingPRIMARY KEY
on any column, as long asWITHOUT ROWID
is not used. but currentlyprint-schema
errors withDiesel only supports tables with primary keys
if a table without explicitPRIMARY KEY
is encounteredsqlite CREATE TABLE ROWIDs and the INTEGER PRIMARY KEY
example SQL:
diesel
Version: 2.1.0
Supported Backends: sqlite
installed via
cargo install diesel_cli --no-default-features --features sqlite
my implementation "expectation" would be that
print-schema
does not error for such cases and automatically adds a column namedrowid
or any of the aliases as the primary key unless a explicitPRIMARY KEY
is used or error if noPRIMARY KEY
is present andWITHOUT ROWID
is usedBeta Was this translation helpful? Give feedback.
All reactions