fuel/oil — Issue #90: [FEATURE] Magic Migration "rename_table" - Allow prefixes_ & longer_table_names
Author: arbme
Created: 2011-12-19 00:44:24+00:00
State: open

Hi,

The following don't work with magic migration, what if you need to rename tables with long names/prefixes and vice versa.

php oil generate migration rename_table_users_to_prefix_users
php oil generate migration rename_table_prefix_users_to_users
php oil generate migration rename_table_users_to_users_table_with_long_name
php oil generate migration rename_table_users_table_with_long_name_to_users_table_with_much_longer_name

Presently if you try the migration looks like this:

namespace Fuel\Migrations;

class Rename_table_users_to_prefix_users
{
public function up()
{
\DBUtil::rename_table('', '');
}

public function down()
{
\DBUtil::rename_table('', '');
}
}

Please could we add this feature, it would make it easier to handle migrations when working with tables that belong to other applications like drupal, wordpress, magneto etc.

Keep up the great work!

Thanks