drop table if exists Users;
create table Users
(
  first_name varchar(30) not null,
  last_name varchar(20) not null,
  email varchar(320) not null unique,
  username varchar(30) not null,
  hashed_password varchar(88) not null,
  salt varchar(44) not null,
  primary key(username)
);

drop table if exists MealPlans;
create table MealPlans
(
  username varchar(30) not null,
  days varchar(9) not null,
  id1 varchar(10) not null,
  id2 varchar(10) not null,
  id3 varchar(10) not null,
  calories decimal not null,
  protein decimal not null,
  fat decimal not null,
  carbohydrates decimal not null,
  primary key(username, days),
  foreign key(username) references Users(username)	
);

drop table if exists Favorites;
create table Favorites
(
  username varchar(30) not null,
  id varchar(10) not null,
  primary key(username, id),
  foreign key(username) references Users(username)	
);