<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class ChangeTablesNames extends Migration
{
    public function up()
    {
        $this->forge->renameTable('wg_activity', 'auth_activity');
        $this->forge->renameTable('wg_backup', 'auth_backup');
        $this->forge->renameTable('wg_confirmation_token', 'auth_confirmation_token');
        $this->forge->renameTable('wg_crontab_history', 'auth_crontab_history');
        $this->forge->renameTable('wg_notification', 'auth_notification');
        $this->forge->renameTable('wg_password_recovery', 'auth_password_recovery');
        $this->forge->renameTable('wg_settings', 'auth_settings');
        $this->forge->renameTable('wg_template', 'auth_template');
        $this->forge->renameTable('wg_theme', 'auth_theme');
        $this->forge->renameTable('wg_timezone', 'auth_timezone');
        $this->forge->renameTable('wg_user', 'auth_user');
        $this->forge->renameTable('wg_user_group', 'auth_user_group');
        $this->forge->renameTable('wg_user_group', 'auth_user_group');
        $this->forge->renameTable('wg_countries', 'auth_countries');
        $this->forge->renameTable('wg_currency', 'auth_currency');
    }

    public function down()
    {
        $this->forge->renameTable('auth_activity', 'wg_activity');
        $this->forge->renameTable('auth_backup', 'wg_backup');
        $this->forge->renameTable('auth_confirmation_token', 'wg_confirmation_token');
        $this->forge->renameTable('auth_crontab_history', 'wg_crontab_history');
        $this->forge->renameTable('wg_notification', 'auth_notification');
        $this->forge->renameTable('auth_password_recovery', 'wg_password_recovery');
        $this->forge->renameTable('auth_settings', 'wg_settings');
        $this->forge->renameTable('auth_template', 'wg_template');
        $this->forge->renameTable('auth_theme', 'wg_theme');
        $this->forge->renameTable('auth_timezone', 'wg_timezone');
        $this->forge->renameTable('auth_user', 'wg_user');
        $this->forge->renameTable('auth_user_group', 'wg_user_group');
        $this->forge->renameTable('auth_countries', 'wg_countries');
        $this->forge->renameTable('auth_currency', 'wg_currency');
    }
}
