Open colocationbg opened 12 months ago
can you replace this files on \application\migrations
A Database Error Occurred Error Number: 1171
All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
CREATE TABLE dashboard_slide
( id
INT(11) UNSIGNED NULL AUTO_INCREMENT, name
VARCHAR(255) NULL, interval
DOUBLE NULL, user_id
INT(11) NULL, CONSTRAINT pk_dashboard_slide
PRIMARY KEY(id
) ) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci
Filename: migrations/20230828192509_create_table_dashboard_slide.php
Line Number: 42
@ridwanskaterock anything i can do to run the cicool ? Could you sent me full package or fix. Thank you in advance
oh sorry can you replace with this
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_create_table_dashboard_slide extends CI_Migration
{
/**
* Name of the table to be used in this migration!
*
* @var string
*/
protected $_table_name = "dashboard_slide";
public function up()
{
$this->dbforge->add_field(array(
'id' => array(
'type' => "INT",
'constraint' => 11,
'null' => false,
'unsigned' => TRUE,
'auto_increment' => TRUE
),
'name' => array(
'type' => "VARCHAR",
'constraint' => 255,
'null' => TRUE,
),
'interval' => array(
'type' => "DOUBLE",
'null' => TRUE,
),
'user_id' => array(
'type' => "INT",
'constraint' => 11,
'null' => TRUE,
),
));
$this->dbforge->add_key('id', TRUE);
$this->dbforge->create_table($this->_table_name);
}
public function down()
{
$this->dbforge->drop_table($this->_table_name, TRUE);
}
}
because id can't null
A Database Error Occurred Error Number: 1075
Incorrect table definition; there can be only one auto column and it must be defined as a key
CREATE TABLE
dashboard_slide
(id
INT(11) UNSIGNED NULL AUTO_INCREMENT,name
VARCHAR(255) NULL,interval
DOUBLE NULL,user_id
INT(11) NULL ) DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ciFilename: migrations/20230828192509_create_table_dashboard_slide.php
Line Number: 41
Server requirements | Status -- | -- You have PHP 7 (or greater; Current Version: 7.4.33 ) | Success. You have PHP 4.1.13 (or greater; Current Version: 8 ) | Success. You have a mysqli extension. | Success. You have a session extension. | Success. You have a mcrypt extension. | Success.Docker and composer, please help me use my product.