0
COMPLETADO

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 hace 7 años actualizado por anonymous hace 7 años 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  

BIEN, ESTOY SATISFECHO.
Puntuación de satisfacción por Claudius Iacob hace 7 años
COMPLETADO

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?