Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/install/installer/pkg/components/database/init/files/00-create-and-init-sessions-db.sql
2506 views
1
-- Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2
-- Licensed under the GNU Affero General Public License (AGPL). See License.AGPL.txt in the project root for license information.
3
4
-- must be idempotent
5
6
CREATE DATABASE IF NOT EXISTS `gitpod-sessions` CHARSET utf8mb4;
7
8
USE `gitpod-sessions`;
9
10
-- This removed again in later migration - in pkg/components/database/incluster/init/04-drop-sessions-db.sql
11
CREATE TABLE IF NOT EXISTS sessions (
12
`session_id` varchar(128) COLLATE utf8mb4_bin NOT NULL,
13
`expires` int(11) unsigned NOT NULL,
14
`data` text COLLATE utf8mb4_bin,
15
`_lastModified` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
16
PRIMARY KEY (`session_id`)
17
);
18
19