pinchbv / floor

The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications
https://pinchbv.github.io/floor/
Apache License 2.0
965 stars 191 forks source link

#775 still an issue #788

Open kevin-haynie opened 11 months ago

kevin-haynie commented 11 months ago

Please fix the code generation for indexes to include IF NOT EXISTS since this is required to avoid errors when executing onCreate manually. #775 should not have been closed as this is still not fixed in 1.4.2.

Thanks Kevin

kevin-haynie commented 11 months ago

All I need is a single line change to createQuery() of index.dart to:

    return 'CREATE$uniqueSql INDEX IF NOT EXISTS `$name`'
        ' ON `$tableName` ($escapedColumnNames)';

Please fix so I don't have to hack your code on my side. And of course you'll need to update your test for this routine as well. Thank you.