s
Size: a a a
s
S
S
s
s
S
О
О
О
️️
V
M
P
M
P
M
\
CREATE TABLE posts (
post_id smallint(5) unsigned auto_increment NOT NULL,
post_author smallint(5) unsigned NOT NULL,
post_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
post_title text NOT NULL,
post_content longtext NOT NULL,
post_status tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (post_id)
);
CREATE TABLE tags (
tag_id tinyint(3) unsigned auto_increment NOT NULL,
tag_name text NOT NULL,
tag_description text NOT NULL,
tag_slug tinytext NOT NULL,
PRIMARY KEY (tag_id)
);
CREATE TABLE tag_relationships (
post_id smallint(5) unsigned NOT NULL,
FOREIGN KEY (post_id)
REFERENCES posts (post_id),
tag_id smallint(5) unsigned NOT NULL,
FOREIGN KEY (tag_id)
REFERENCES tags (tag_id)
);
почему я не могу создать внешние ключи №1215 ошибка (не возможно создать внешние ключи)?V
CREATE TABLE posts (
post_id smallint(5) unsigned auto_increment NOT NULL,
post_author smallint(5) unsigned NOT NULL,
post_date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
post_title text NOT NULL,
post_content longtext NOT NULL,
post_status tinyint(1) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (post_id)
);
CREATE TABLE tags (
tag_id tinyint(3) unsigned auto_increment NOT NULL,
tag_name text NOT NULL,
tag_description text NOT NULL,
tag_slug tinytext NOT NULL,
PRIMARY KEY (tag_id)
);
CREATE TABLE tag_relationships (
post_id smallint(5) unsigned NOT NULL,
FOREIGN KEY (post_id)
REFERENCES posts (post_id),
tag_id smallint(5) unsigned NOT NULL,
FOREIGN KEY (tag_id)
REFERENCES tags (tag_id)
);
почему я не могу создать внешние ключи №1215 ошибка (не возможно создать внешние ключи)?\
\