Hi, Clemens, On Wed, Sep 27, 2017 at 7:04 AM, Clemens Ladisch <[email protected]> wrote: > Igor Korot wrote: >> 3. DROP TABLE <fkTabke>; >> >> On step 3 all ttriggers and indexes will be dropped as well, right? > > Yes. > >> 4. CREATE TABLE <fkTable>(, FOREIGN KEY() REFERENCE pkTable() ) AS SELECT * >> FROM temp; >> >> what would be the best way to read [triggers and indexes] and apply to the >> step 4? > > Run .schema in the command-line shell, and search where the table name is > mentioned. > > Alternatively, if you're feeling adventurous, you can use PRAGMA > writable_schema > to modify the table definition in place: > https://stackoverflow.com/a/42970982/11654
It would be nice if that backdoor was implemented as "ALTER TABLE..." one. But that aside I am trying to run this from the C interface. I guess I can just try to implement it in my program. Just curious - why I should feel adventurous? Thank you. > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

