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

Bug: SQLite drop column corrupts table cache #3752

Closed
MGatner opened this issue Oct 10, 2020 · 0 comments · Fixed by #3753
Closed

Bug: SQLite drop column corrupts table cache #3752

MGatner opened this issue Oct 10, 2020 · 0 comments · Fixed by #3753
Labels
bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer

Comments

@MGatner
Copy link
Member

MGatner commented Oct 10, 2020

Describe the bug
Still looking into this one, but here's the issue (in a migration):

d(db_connect('tests')->listTables()); // db_users, db_pages, db_auth_groups
$this->forge->dropColumn('users', 'lastname');
d(db_connect('tests')->listTables()); // db_users

Resetting the cache before calling listTables() demonstrates that the tables are still really there:

d(db_connect('tests')->listTables()); // db_users, db_pages, db_auth_groups
$this->forge->dropColumn('users', 'lastname');
d(db_connect('tests')->resetDataCache()->listTables()); // db_users, db_pages, db_auth_groups

I have confirmed this is not an issue for MySQL.

CodeIgniter 4 version
develop

Affected module(s)
Database/SQLite3

Context

  • OS: Ubuntu 20.04
  • Web server: Apache
  • PHP version: 7.4
@MGatner MGatner added bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer labels Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant