phalcon/cphalcon — pull request #2832 by h0tw1r3 (2014-09-21 23:43:21+00:00)
Title: Sqlite dialect createTable support

Copied from the Mysql dialect and massaged a bit.

Since sqlite doesn't support a normal primary key when auto increment is used, I had to wrap the whole thing in a transaction (savepoint).

There's also a little fix to the listTables function so it behaves like .tables in the command line tool. Otherwise migrations keep dumping out internal (sqlite_*) tables.

[I used this script for testing with the invo project.](https://gist.github.com/h0tw1r3/dff4243ab9dec2354ef0)

Todo: see line 552 of diff below. I'm not sure how to check the value against the columns list, or even if I'm going about it properly.