php-migration icon indicating copy to clipboard operation
php-migration copied to clipboard

`SqliteDatabase#dropDatabase` ignores views

Open chpio opened this issue 2 years ago • 4 comments

Hi, ByJG\DbMigration\Database\SqliteDatabase#dropDatabase ignores created views which causes errors if you're using the reset command on a database with views ("SQLSTATE[HY000]: General error: 1 table my_view already exists").

chpio avatar Oct 29 '21 10:10 chpio

Could you provide a small example of your base.sql and migration files to help me to reproduce your issue at my side?

byjg avatar Oct 29 '21 12:10 byjg

Bump

byjg avatar Oct 31 '21 02:10 byjg

https://github.com/chpio/repro_byjg_migration_sqlite_view

then execute ./db reset -vvv twice. (why is a flag needed to print sql errors? without -vvv it just prints "-- Error migrating tables --" without an actual error).

chpio avatar Nov 04 '21 09:11 chpio

OK, I found the issue and created PR #40.

About the -vvv, it is the very verbose mode. Without that, only the programs only show the error.

byjg avatar Nov 04 '21 23:11 byjg