title: errno: 150 "Foreign key constraint is incorrectly formed") MariaDB
body: <p>When I run the following script: </p>
  
  <pre><code> DROP TABLE IF EXISTS `schemaname`.`tablename` ;
  
   CREATE TABLE IF NOT EXISTS `schemaname`.`tablename` (
     `id` INT(11) NOT NULL AUTO_INCREMENT,
     `ip` VARCHAR(25) NOT NULL,
     `address` TEXT NULL DEFAULT NULL,
   PRIMARY KEY (`id`))
   ENGINE = InnoDB
   DEFAULT CHARACTER SET = latin1;
  </code></pre>
  
  <p>It returns these error: </p>
  
  <pre><code>Error Code: 1005. Can't create table `schemaname`.`tablename` (errno: 150 "Foreign key constraint is incorrectly formed")
  </code></pre>
  
  <p>There was a table with the same name but a different structured that I deleted and also I deleted the tables that had foreign key with it.</p>
  
  <p>If I try to create it with another name, then it works.
  Why can't I create a table with the same name with that one that I deleted?</p>