• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.