Jaguar-dart / jaguar_orm

Source-generated ORM with relations (one-to-one, one-to-many, many-to-many), preloading, cascading, polymorphic relations, etc
https://jaguar-dart.github.io
BSD 3-Clause "New" or "Revised" License
217 stars 52 forks source link

Drop database statement is incorrect #128

Closed JamesMcIntosh closed 5 years ago

JamesMcIntosh commented 5 years ago

I went to use the drop database statement but it tried to create a database instead.

String composeDropDb(final DropDb st) => "CREATE DATABASE ${st.name}";

Should be

String composeDropDb(final DropDb st) => "DROP DATABASE ${st.name}";

https://github.com/Jaguar-dart/jaguar_orm/blob/07c3b63e8b4c5646ac157385cb0268c2c2be3560/sqflite/lib/src/compose/delete.dart#L20

tejainece commented 5 years ago

Fixed by https://github.com/Jaguar-dart/jaguar_orm/commit/ff219bc1fb7eccc034b87db6e461ba7a27269a72.

Published to pub as 2.2.10.