-- +goose Up
CREATE TABLE IF NOT EXISTS suppliers (
    id SERIAL PRIMARY KEY,
    request_id UUID NOT NULL REFERENCES requests_for_suppliers(id) ON DELETE CASCADE,
    name TEXT NOT NULL,
    email TEXT,
    phone TEXT,
    adress TEXT,
    url TEXT,
    created_at TIMESTAMP DEFAULT now()
);

CREATE INDEX IF NOT EXISTS idx_suppliers_request_id ON suppliers(request_id);

-- +goose Down
DROP TABLE suppliers;
