SQLite Forum

DB operation inside commit hook / enforce explicit INTEGER PRIMARY KEY column
Neither the authorizer hook nor the commit hook are allowed to execute the SELECT. And sqlite3\_table\_column\_metadata() does not work if you do not know the column name.

As far as I can see, you cannot prevent the CREATE TABLE statement immediately, and have to do the check later, probably when you're trying to use the table.