0
Voltooid

It *looks* like you do not support SQLite foreign keys constraints in your models. However, according to this page, they are supported: https://sqlite.org/foreignkeys.html

Claudius Iacob 7 jaar geleden bijgewerkt door Michał Kołodziejski 7 jaar geleden 1

It *looks* like you do not support SQLite foreign keys constraints in your models. However, according to this page, they are supported: https://sqlite.org/foreignkeys.html


If I'm missing something, please forgive me (and point me in the right direction).


Thank you,

Claudius Iacob  

GOED, IK BEN TEVREDEN
Satisfaction mark by Claudius Iacob 7 jaar geleden
Voltooid

We do support foreign keys for SQLite models.

From such model:



this SQL code is generated:

-- Table: a
CREATE TABLE a (
    id integer NOT NULL CONSTRAINT a_pk PRIMARY KEY
); -- Table: b
CREATE TABLE b (
    id integer NOT NULL CONSTRAINT b_pk PRIMARY KEY,
    a_id integer NOT NULL,
    CONSTRAINT b_a FOREIGN KEY (a_id)
    REFERENCES a (id)
);

As you can see, there's a FOREIGN KEY code.

Is this what you were looking for?