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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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