blob: c00d7d6d01d5bea4c8fb1bf14bc83a6428b320af [file]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
\c texera_db
SET search_path TO texera_db;
BEGIN;
-- Per-user JupyterLab registration: one row per provisioned user, so the service resolves
-- endpoints per user instead of from process-wide config. Both URLs are stored rather than
-- derived, matching workflow_computing_unit.uri, so addressing can change without a code
-- change: internal_url is what the service calls, public_url is what the browser loads.
-- The token is derived from a server secret and the uid, so it is not stored.
CREATE TABLE IF NOT EXISTS user_jupyter
(
uid INT NOT NULL PRIMARY KEY,
internal_url VARCHAR(512) NOT NULL,
public_url VARCHAR(512) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE
);
COMMIT;