framework icon indicating copy to clipboard operation
framework copied to clipboard

Migrate::refresh duplicate wordpress table prefix

Open DaWolfey opened this issue 5 years ago • 1 comments

  • Themosis Version: 2.0.5

Description

migrate::refresh fails to remove the old tables as it adds a double prefix to the drop command

Steps to reproduce

Create a migration with any table name, eg test_table (Schema::create('test-table') etc migrate::install so that the table is created along with the migrations table Note that both of these tables have the wordpress prefix applied as expected Now migrate::refresh, which should flush the migrations table, drop the tables it refers to, then run the migration again. The error is given: SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'databasename.wp_wp_test_table' Note the additional wp_ prefix has been applied, causing the error.

DaWolfey avatar Jan 25 '20 15:01 DaWolfey

@DaWolfey Thanks for catching this one, I'll take a look or perhaps do you have time to submit a pull request regarding this?

jlambe avatar Jan 28 '20 10:01 jlambe