Guest User

Untitled

a guest
Aug 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. Fragments of old tables left behind after DROP SCHEMA
  2. SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
  3. SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
  4. SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
  5.  
  6. DROP SCHEMA IF EXISTS `scunthorpe` ;
  7.  
  8. CREATE SCHEMA IF NOT EXISTS `scunthorpe` DEFAULT CHARACTER SET latin1 ;
  9. USE `scunthorpe` ;
  10.  
  11. DROP TABLE IF EXISTS `location` ;
  12.  
  13. CREATE TABLE IF NOT EXISTS `location` (
  14. `id_location` INT NOT NULL AUTO_INCREMENT ,
  15. `location` VARCHAR(45) NOT NULL ,
  16. PRIMARY KEY (`id_location`) )
  17. ENGINE = InnoDB
  18. DEFAULT CHARACTER SET = latin1;
  19.  
  20. DROP TABLE IF EXISTS `strand` ;
  21.  
  22. CREATE TABLE IF NOT EXISTS `strand` (
  23. `id_location` INT NOT NULL ,
  24. `id_strand` INT NOT NULL ,
  25. `notes` VARCHAR(45) NOT NULL ,
  26. PRIMARY KEY (`id_location`, `id_strand`) ,
  27. INDEX `strand_location_fkey` (`id_location` ASC) ,
  28. CONSTRAINT `strand_location_fkey`
  29. FOREIGN KEY (`id_location` )
  30. REFERENCES `location` (`id_location` )
  31. ON DELETE CASCADE
  32. ON UPDATE CASCADE)
  33. ENGINE = InnoDB
  34. DEFAULT CHARACTER SET = latin1;
  35.  
  36. ERROR 1005 (HY000): Can't create table '.scunthorpestrand.frm' (errno: 150)
  37.  
  38. 111021 10:46:17 Error in foreign key constraint of table scunthorpe/straightenin
  39. g_temperature:
  40. there is no index in referenced table which would contain
  41. the columns as the first columns, or the data types in the
  42. referenced table do not match to the ones in table. Constraint:
  43. ,
  44. CONSTRAINT straightening_to_strand_fkey FOREIGN KEY (id_location, id_sequence,
  45. id_strand) REFERENCES strand (id_location, id_sequence, id_strand)
Add Comment
Please, Sign In to add comment