-- Add registry credentials for private Docker registry authentication during builds
CREATE TABLE registry_credentials (
    id INTEGER PRIMARY KEY,
    app_id TEXT NOT NULL REFERENCES apps(id) ON DELETE CASCADE,
    registry TEXT NOT NULL,
    username TEXT NOT NULL,
    password TEXT NOT NULL,
    UNIQUE(app_id, registry)
);

CREATE INDEX idx_registry_credentials_app_id ON registry_credentials(app_id);
