D. Richard Hipp wrote:
> Before doing the "DELETE TABLE t1" you can run this query:
>
>     SELECT sql FROM sqlite_master WHERE tbl_name!=name AND
> tbl_name='t1';
>
> That query will give you the complete text of all CREATE INDEX
> and CREATE TRIGGER statements associated with table t1.  Save
> these results.  Then delete table t1 and recreate it in its
> new form.  Then rerun the CREATE INDEX and CREATE TRIGGER
> statements that you saved.  This will automatically recreate
> all of your indices and triggers.

Richard,

This will help in many cases, but it won't work if the triggers or indexes
reference columns that were deleted or renamed by the "ALTER TABLE".

Reply via email to