You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class AddTest extends Migration
{
public function up()
{
$primary_key = [
'type' => 'INT',
'constraint' => 5,
'unsigned' => true,
'auto_increment' => true,
];
$title = [
'type' => 'VARCHAR',
'constraint' => '100',
];
$this->forge->addField([
'id' => $primary_key,
'test' => $title
]);
$this->forge->addKey('id', true);
$this->forge->createTable('test', TRUE);
// HERE SECOND ARGUMENT is TRUE to create if not exists statement
}
public function down()
{
$this->forge->dropTable('test');
}
}
Describe the bug
I still receive the error table already exists
When i check the SQL the statement "IF NOT EXISTS" does not appear in the SQL
I checked the code
CodeIgniter 4 version
Latest
Expected behavior, and steps to reproduce if appropriate
This should not give an error and instead should prepend the "IF TABLE NOT EXISTS" statement when try to create table
The text was updated successfully, but these errors were encountered:
crustamet
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Oct 11, 2020
Direction
Describe the bug
I still receive the error table already exists
When i check the SQL the statement "IF NOT EXISTS" does not appear in the SQL
I checked the code
CodeIgniter 4 version
Latest
Expected behavior, and steps to reproduce if appropriate
This should not give an error and instead should prepend the "IF TABLE NOT EXISTS" statement when try to create table
The text was updated successfully, but these errors were encountered: