lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

Support connection prefix for database table names #25

Closed schmunk42 closed 9 years ago

schmunk42 commented 9 years ago

I tried this migration, which basically worked. But somewhere in the translate-manager the language table name was seem to be hardcoded, even if I reconfigured the property.

<?php

use yii\db\Schema;
use yii\db\Migration;

class m150626_231337_update_table_names extends Migration
{
    public function up()
    {
        $this->renameTable('language_translate', '{{%language_translate}}');
        $this->renameTable('language_source', '{{%language_source}}');
        $this->renameTable('language', '{{%language}}');
    }

    public function down()
    {
        $this->renameTable('{{%language_translate}}', 'language_translate');
        $this->renameTable('{{%language_source}}', 'language_source');
        $this->renameTable('{{%language}}', 'language');
    }
}

Would be nice if your module could adhere the connection prefix, since language is a very common name.

schmunk42 commented 9 years ago

Cool, thanks!