D
D
Dim Boy2016-01-20 22:39:32
MySQL
Dim Boy, 2016-01-20 22:39:32

Why does the software swear at the lack of a primary key?

There is a denver with innodb settings.
does not want to accept the base, writes:

This is probably due not one or more tables missing a primary key or the primary key being set on a wrong column.

My base structure - what's wrong:
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for 14
-- ----------------------------
CREATE TABLE `2014` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `Media` varchar(255) DEFAULT NULL,
  `Year` varchar(255) DEFAULT NULL,
  `Month` varchar(255) DEFAULT NULL,
  `Date` varchar(255) DEFAULT NULL,
  `Ins` varchar(255) DEFAULT NULL,
  `Summa, uah` varchar(255) DEFAULT NULL,
  `Sector` varchar(255) DEFAULT NULL,
  `Category` varchar(255) DEFAULT NULL,
  `Class` varchar(255) DEFAULT NULL,
  `Producer` varchar(255) DEFAULT NULL,
  `Brand` varchar(255) DEFAULT NULL,
  `Product` varchar(255) DEFAULT NULL,
  `Copy` varchar(255) DEFAULT NULL,
  `Market` varchar(255) DEFAULT NULL,
  `Distributor` varchar(255) DEFAULT NULL,
  `Ad Type` varchar(255) DEFAULT NULL,
  `Ad Format` varchar(255) DEFAULT NULL,
  `Duration` varchar(255) DEFAULT NULL,
  `Start Time` varchar(255) DEFAULT NULL,
  `End Time` varchar(255) DEFAULT NULL,
  `Publishing house` varchar(255) DEFAULT NULL,
  `Periodical type` varchar(255) DEFAULT NULL,
  `Site type` varchar(255) DEFAULT NULL,
  `Ad Size` varchar(255) DEFAULT NULL,
  `Audio code Outdoor` varchar(255) DEFAULT NULL,
  `Audio code Press` varchar(255) DEFAULT NULL,
  `Audio code Radio` varchar(255) DEFAULT NULL,
  `Audio code Internet` varchar(255) DEFAULT NULL,
  `Ad Section Type` varchar(255) DEFAULT NULL,
  `Ad Section` varchar(255) DEFAULT NULL,
  `Ad Position` varchar(255) DEFAULT NULL,
  `Ad Page` varchar(255) DEFAULT NULL,
  `Issue No` varchar(255) DEFAULT NULL,
  `Ad Color` varchar(255) DEFAULT NULL,
  `Circulation` varchar(255) DEFAULT NULL,
  `Display Perc` varchar(255) DEFAULT NULL,
  `Extension` varchar(255) DEFAULT NULL,
  `Agency Internet` varchar(255) DEFAULT NULL,
  `Buyer Internet` varchar(255) DEFAULT NULL,
  `Damage` varchar(255) DEFAULT NULL,
  `Direction` varchar(255) DEFAULT NULL,
  `Programme/Location` varchar(255) DEFAULT NULL,
  `Prog/Location Typology\Variables` varchar(255) DEFAULT NULL,
  `Investment` varchar(255) DEFAULT NULL,
  `Skidka` varchar(255) DEFAULT NULL,
  `Flag Raschet` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2183016 DEFAULT CHARSET=utf8;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Natarov, 2016-01-20
@HanDroid

Either PRIMARY KEY (`id`) without quotes i.e. so PRIMARY KEY (id)
Or for innodb to prescribe so. taken from docks

create table innodb_uuid_no_key_unique_indexed (
  id char(36),
  unique index index1 (id)
) type=innodb;

For oracle, this is generally prescribed
ID Integer PRIMARY KEY AUTOINCREMENT,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question