Currently, migration script generation attempts to create an idempotent script (aka can be run repeatedly and have the same effect.) With SQLite, this is not possible using SQL statements alone as SQLite does not support conditional
One possible way to workaround this limitation:
Generate a script using LUA or Python (or something else) that will execute the if-else logic we need. Embed the SQL statements into this higher-level scripting language.