After running this and successfully creating the database, tables and both the primary and foreign keys, when I reverse engineer my database it won't show the relationships between tables. I'm using a MacBook Air(2017) Mojave 10.14.6, no dark mode and I've tried changing relationships notation from craw's foot to the others but still no luck.
create database test_asdf;
use test_asdf;
create table Department
(id int not null unique auto_increment primary key,
name varchar(30));
create table Professor
(id int not null unique auto_increment primary key,
name varchar(30),
adress varchar(50),
department_id int,
section_id int,
foreign key (department_id) references Department(id));
Now the thing is when I run the following the connections show:
create database test_asdf8;
use test_asdf8;
create table table1
(id int not null unique auto_increment primary key,
name varchar(30),
table2_id int);
create table table2
(id int not null unique auto_increment primary key,
name varchar(30),
new_id int,
foreign key (new_id) references table1(id));
Could someone please point out what I'm doing wrong here?