SqliteHelper
SqliteHelper copied to clipboard
Add Foreign Key & ON DELETE&UPDATE CASCADE
I want to use the mehtod "CreateTable" but i couldn't set the Foreign Key to the Column.
It would be nice, if the the method can do as example:
CREATE TABLE table_name
(
column1 datatype [ NULL | NOT NULL ],
column2 datatype [ NULL | NOT NULL ],
...
CONSTRAINT fk_column
FOREIGN KEY (column1, column2, ... column_n)
REFERENCES parent_table (column1, column2, ... column_n)
ON DELETE CASCADE
);
Hi @hhu-mahmoud I explicitly wanted to avoid this level of configurability/abstraction because of the complexity it would introduce. Further I'm merging this project into the DatabaseWrapper project and I'd have to do something consistent across Sqlite as well as SQL Server, MySQL, Postgres, etc.
Will keep this open as an enhancement. If you'd like to submit a PR please feel free. Otherwise I'll keep it and get to it as I can. Thanks!
@jchristn yes it can be opend as enhancement. i will see, if i find time later, then i will sumbit PR. Thank you