Welcome Guest, Not a member yet? Register   Sign In
dropTable() not working when no database prefix set.
#1

Hi, 
When I roll out migration ,the following error appears:

D:\xampp\htdocs\ci4.dev\pms>php spark migrate:rollback

CodeIgniter CLI Tool - Version 4.0-dev - Server-Time: 2017-09-25 20:22:32pm

Rolling back all migrations...

strpos(): Empty needle
D:\xampp\htdocs\ci4.dev\pms\system\Database\Forge.php - 492

Done

my migration code is

PHP Code:
<?php namespace App\Database\Migrations;

use 
CodeIgniter\Database\Migration;

class 
Migration_Add_project_table extends Migration
{
    

    public function 
up()
    {
        
        
$this->forge->addField([
            
'blog_id'          => [
                
'type'           => 'INT',
                
'constraint'     => 5,
                
'unsigned'       => true,
                
'auto_increment' => true,
            ],
            
'blog_title'       => [
                
'type'       => 'VARCHAR',
                
'constraint' => '100',
            ],
            
'blog_description' => [
                
'type' => 'TEXT',
                
'null' => true,
            ],
        ]);
                
$this->forge->addKey('blog_id'true);
                
$this->forge->createTable('blog');
    }
    public function 
down()
    {
         
$this->forge->dropTable('blog');
    }

          Heart  love codeigniter Heart
          Learning  best  practices
     Rate my post if you found it helpfull
Reply
#2

(This post was last modified: 09-27-2017, 09:56 PM by jaynarayan.)

It was big and fixed. https://github.com/bcit-ci/CodeIgniter4/pull/736
          Heart  love codeigniter Heart
          Learning  best  practices
     Rate my post if you found it helpfull
Reply




Theme © iAndrew 2016 - Forum software by © MyBB