Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqliteDatabase#dropDatabase ignores views #39

Open
chpio opened this issue Oct 29, 2021 · 4 comments
Open

SqliteDatabase#dropDatabase ignores views #39

chpio opened this issue Oct 29, 2021 · 4 comments

Comments

@chpio
Copy link

chpio commented Oct 29, 2021

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 chpio changed the title SqliteDatabase#dropDatabase` ignores views SqliteDatabase#dropDatabase ignores views Oct 29, 2021
@byjg
Copy link
Owner

byjg commented Oct 29, 2021

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

@byjg
Copy link
Owner

byjg commented Oct 31, 2021

Bump

@chpio
Copy link
Author

chpio commented Nov 4, 2021

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).

@byjg
Copy link
Owner

byjg commented Nov 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants