Sorry 😦 I forgot to mention my scenario: - Table A has column `b_id` which reference table B column

Sorry 😦 I forgot to mention my scenario:
  • Table A has column
    b_id
    which reference table B column
    id
    ,
    ON DELETE CASCADE ON UPDATE CASCADE
  • In my migration file, I'm trying to do a workaround like this:
    PRAGMA foreign_keys = OFF;
    create table b_temp ...;
    drop table b...;
    alter table b_tmp rename to b;
    PRAGMA foreign_keys = ON;

    but all of my records in table A is cascaded
Was this page helpful?