Closed ChibuezeAgwuDennis closed 4 years ago
Can you try the latest develop branch if the problem is still there?
Or did you check if the table you are using actually has the group
column.
That sounds like an issue with the query, not the framework, but if you could provide the schema and code you're using we can verify.
That sounds like an issue with the query, not the framework, but if you could provide the schema and code you're using we can verify.
Here is the code i will like you to check it
namespace App\Database\Migrations;
use CodeIgniter\Config\Config;
use CodeIgniter\Database\Migration;
class Cart extends Migration
{
public function up()
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'constraint' => 50,
'unsigned' => true,
'auto_increment' => true,
],
'user_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'default' => 0
],
'identifier' => [
'type' => 'VARCHAR',
'constraint' => '150',
],
'instance' => [
'type' => 'VARCHAR',
'constraint' => '200',
],
'content' => [
'type' => 'TEXT',
'null' => true
],
]);
$this->forge->addKey(['identifier', 'instance']);
$this->forge->addPrimaryKey('identifier');
$this->forge->createTable(Config::get('cart')->database['table']);
}
//--------------------------------------------------------------------
public function down()
{
$this->forge->dropTable(Config::get('cart')->database['table']);
}
}
here is my config code
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Cart extends BaseConfig
{
/*
|--------------------------------------------------------------------------
| Default tax rate
|--------------------------------------------------------------------------
|
| This default tax rate will be used when you make a class implement the
| Taxable interface and use the HasTax trait.
|
*/
public $tax = 21;
/*
|--------------------------------------------------------------------------
| Shoppingcart database settings
|--------------------------------------------------------------------------
|
| Here you can set the connection that the shoppingcart should use when
| storing and restoring a cart.
|
*/
public $database = [
'connection' => null,
'table' => 'cart',
];
/*
|--------------------------------------------------------------------------
| Destroy the cart on user logout
|--------------------------------------------------------------------------
|
| When this option is set to 'true' the cart will automatically
| destroy all cart instances when the user logs out.
|
*/
public $destroy_on_logout = false;
/*
|--------------------------------------------------------------------------
| Default number format
|--------------------------------------------------------------------------
|
| This defaults will be used for the formated numbers if you don't
| set them in the method call.
|
*/
public $format = [
'decimals' => 2,
'decimal_point' => '.',
'thousand_seperator' => ','
];
}
Were am I doing it wrong
Or did you check if the table you are using actually has the
group
column.
I am not sure I called anything relating to column group check the code above and that is the only code I am trying to migrate
Hello Team group I run a composer command to migrate my database schemas here is the error i got. Please this need a fix