Welcome Guest, Not a member yet? Register   Sign In
Run migration
#1

Hello!
How can I run a migration in CodeIgniter?
Reply
#2

You mean upgrading to a new version? It's in the manual.
Up to 3.x
https://codeigniter.com/user_guide/insta...ading.html

From 3.x to 4.x
https://codeigniter4.github.io/userguide...e_4xx.html
Reply
#3

Solved problems with the controller
PHP Code:
<?php defined('BASEPATH') or exit('go home');


class 
Migrate extends CI_Controller
{
    /**
     * Запуск миграций в проекте.
     */
    public function index()
    {
        $this->load->library('migration');

        if ($this->migration->current() === FALSE)
        {
            show_error($this->migration->error_string());
        }
    }


Reply




Theme © iAndrew 2016 - Forum software by © MyBB