Skip to content

Commit

Permalink
fix: db mapper does not work with sqlite views
Browse files Browse the repository at this point in the history
quickfix for issue where f3 db mapper does not work with sqlite views
  • Loading branch information
jlazic authored and ikkez committed Jul 28, 2021
1 parent 62f40d8 commit c9a993c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db/sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function schema($table,$fields=NULL,$ttl=0) {
$cmd=[
'sqlite2?'=>[
'SELECT * FROM pragma_table_info('.$this->quote($table).') JOIN ('.
'SELECT sql FROM sqlite_master WHERE type=\'table\' AND '.
'SELECT sql FROM sqlite_master WHERE (type=\'table\' OR type=\'view\') AND '.
'name='.$this->quote($table).')',
'name','type','dflt_value','notnull',0,'pk',TRUE,'sql',
'/\W(%s)\W+[^,]+?AUTOINCREMENT\W/i'],
Expand Down

0 comments on commit c9a993c

Please sign in to comment.