-- Author: Hayden Hargreaves (hhargreaves2006@gmail.com)
-- Desc:   Create the favorites table.
-- Date:   07/14/2025

BEGIN;

CREATE TABLE IF NOT EXISTS Favorites (
  Id SERIAL PRIMARY KEY NOT NULL, 
  UserId INTEGER NOT NULL REFERENCES users(id),
  RecipeId INTEGER NOT NULL REFERENCES recipes(id),
  Created TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

COMMIT;
