Listing 2. add_location.sql

drop table if exists locations;
create table locations(
  id int unsigned not null auto_increment,
  address_id int unsigned not null,
  longitude double not null,
  latitude double not null,
  primary key(id),
  foreign key (address_id) references address(id)
    on delete cascade
);

