###########################################################################
# Copyright 2021 Huawei Technologies Co., Ltd.
# Licensed 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.
############################################################################


apiVersion: v1
kind: ConfigMap
metadata:
  name: thirdsystem-postgres-initdb-configmap
data:
  postgres.sql: |

    CREATE TABLE IF NOT EXISTS THIRD_SYSTEM_TABLE (
        ID VARCHAR(100) NOT NULL,
        SYSTEM_NAME VARCHAR(100) DEFAULT NULL,
        SYSTEM_TYPE VARCHAR(100) DEFAULT NULL,
        VERSION VARCHAR(100) DEFAULT NULL,
        URL VARCHAR(100) DEFAULT NULL,
        IP VARCHAR(100) DEFAULT NULL,
        PORT VARCHAR(100) DEFAULT NULL,
        REGION VARCHAR(100) DEFAULT NULL,
        USERNAME VARCHAR(100) DEFAULT NULL,
        PASSWORD VARCHAR(100) DEFAULT NULL,
        PRODUCT VARCHAR(100) DEFAULT NULL,
        VENDOR VARCHAR(100) DEFAULT NULL,
        TOKEN_TYPE VARCHAR(100) DEFAULT NULL,
        ICON TEXT DEFAULT NULL,
        STATUS VARCHAR(100) DEFAULT NULL,
        CONSTRAINT THIRD_SYSTEM_TABLE_PKEY PRIMARY KEY (ID)
    );