| /* |
| * 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. |
| */ |
| |
| SET FOREIGN_KEY_CHECKS=0; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_access |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_access`; |
| CREATE TABLE `linkis_ps_datasource_access` ( |
| `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| `table_id` bigint(20) NOT NULL, |
| `visitor` varchar(16) COLLATE utf8_bin NOT NULL, |
| `fields` varchar(255) COLLATE utf8_bin DEFAULT NULL, |
| `application_id` int(4) NOT NULL, |
| `access_time` datetime NOT NULL, |
| PRIMARY KEY (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_field |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_field`; |
| CREATE TABLE `linkis_ps_datasource_field` ( |
| `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| `table_id` bigint(20) NOT NULL, |
| `name` varchar(64) COLLATE utf8_bin NOT NULL, |
| `alias` varchar(64) COLLATE utf8_bin DEFAULT NULL, |
| `type` varchar(64) COLLATE utf8_bin NOT NULL, |
| `comment` varchar(255) COLLATE utf8_bin DEFAULT NULL, |
| `express` varchar(255) COLLATE utf8_bin DEFAULT NULL, |
| `rule` varchar(128) COLLATE utf8_bin DEFAULT NULL, |
| `is_partition_field` tinyint(1) NOT NULL, |
| `is_primary` tinyint(1) NOT NULL, |
| `length` int(11) DEFAULT NULL, |
| PRIMARY KEY (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_import |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_import`; |
| CREATE TABLE `linkis_ps_datasource_import` ( |
| `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| `table_id` bigint(20) NOT NULL, |
| `import_type` int(4) NOT NULL, |
| `args` varchar(255) COLLATE utf8_bin NOT NULL, |
| PRIMARY KEY (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_lineage |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_lineage`; |
| CREATE TABLE `linkis_ps_datasource_lineage` ( |
| `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| `table_id` bigint(20) DEFAULT NULL, |
| `source_table` varchar(64) COLLATE utf8_bin DEFAULT NULL, |
| `update_time` datetime DEFAULT NULL, |
| PRIMARY KEY (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_table |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_table`; |
| CREATE TABLE `linkis_ps_datasource_table` ( |
| `id` bigint(255) NOT NULL AUTO_INCREMENT, |
| `database` varchar(64) COLLATE utf8_bin NOT NULL, |
| `name` varchar(64) COLLATE utf8_bin NOT NULL, |
| `alias` varchar(64) COLLATE utf8_bin DEFAULT NULL, |
| `creator` varchar(16) COLLATE utf8_bin NOT NULL, |
| `comment` varchar(255) COLLATE utf8_bin DEFAULT NULL, |
| `create_time` datetime NOT NULL, |
| `product_name` varchar(64) COLLATE utf8_bin DEFAULT NULL, |
| `project_name` varchar(255) COLLATE utf8_bin DEFAULT NULL, |
| `usage` varchar(128) COLLATE utf8_bin DEFAULT NULL, |
| `lifecycle` int(4) NOT NULL, |
| `use_way` int(4) NOT NULL, |
| `is_import` tinyint(1) NOT NULL, |
| `model_level` int(4) NOT NULL, |
| `is_external_use` tinyint(1) NOT NULL, |
| `is_partition_table` tinyint(1) NOT NULL, |
| `is_available` tinyint(1) NOT NULL, |
| PRIMARY KEY (`id`), |
| UNIQUE KEY `database` (`database`,`name`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| |
| -- ---------------------------- |
| -- Table structure for linkis_ps_datasource_table_info |
| -- ---------------------------- |
| DROP TABLE IF EXISTS `linkis_ps_datasource_table_info`; |
| CREATE TABLE `linkis_ps_datasource_table_info` ( |
| `id` bigint(20) NOT NULL AUTO_INCREMENT, |
| `table_id` bigint(20) NOT NULL, |
| `table_last_update_time` datetime NOT NULL, |
| `row_num` bigint(20) NOT NULL, |
| `file_num` int(11) NOT NULL, |
| `table_size` varchar(32) COLLATE utf8_bin NOT NULL, |
| `partitions_num` int(11) NOT NULL, |
| `update_time` datetime NOT NULL, |
| `field_num` int(11) NOT NULL, |
| PRIMARY KEY (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |