CREATE TABLE users (
    id TEXT PRIMARY KEY,
    email TEXT NOT NULL UNIQUE
);

CREATE TABLE password_hashes (
    user_id TEXT PRIMARY KEY REFERENCES users(id),
    hash TEXT NOT NULL
);

CREATE TABLE oauth_providers (
    user_id TEXT NOT NULL REFERENCES users(id),
    provider TEXT NOT NULL,
    provider_id TEXT NOT NULL,
    PRIMARY KEY (provider, provider_id)
);
