|
1 |
| -/* |
2 |
| - * Licensed to the Apache Software Foundation (ASF) under one or more |
3 |
| - * contributor license agreements. See the NOTICE file distributed with |
4 |
| - * this work for additional information regarding copyright ownership. |
5 |
| - * The ASF licenses this file to You under the Apache License, Version 2.0 |
6 |
| - * (the "License"); you may not use this file except in compliance with |
7 |
| - * the License. You may obtain a copy of the License at |
8 |
| - * |
9 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
10 |
| - * |
11 |
| - * Unless required by applicable law or agreed to in writing, software |
12 |
| - * distributed under the License is distributed on an "AS IS" BASIS, |
13 |
| - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 |
| - * See the License for the specific language governing permissions and |
15 |
| - * limitations under the License. |
16 |
| - */ |
17 |
| - |
18 |
| -DROP TABLE IF EXISTS "linkis_ps_instance_info"; |
19 |
| -CREATE TABLE linkis_ps_instance_info ( |
20 |
| - id serial NOT NULL, |
21 |
| - "instance" varchar(128) NULL, |
22 |
| - "name" varchar(128) NULL, |
23 |
| - update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
24 |
| - create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
25 |
| - CONSTRAINT linkis_instance_info_pkey PRIMARY KEY (id) |
26 |
| -); |
27 |
| -CREATE UNIQUE INDEX uniq_instance_ii ON linkis_ps_instance_info USING btree (instance); |
28 |
| - |
29 |
| - |
30 |
| -DROP TABLE IF EXISTS "linkis_ps_instance_label"; |
31 |
| -CREATE TABLE linkis_ps_instance_label ( |
32 |
| - id serial NOT NULL, |
33 |
| - label_key varchar(32) NOT NULL, |
34 |
| - label_value varchar(255) NOT NULL, |
35 |
| - label_feature varchar(16) NOT NULL, |
36 |
| - label_value_size int4 NOT NULL, |
37 |
| - update_time timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
38 |
| - create_time timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
39 |
| - CONSTRAINT linkis_instance_label_pkey PRIMARY KEY (id) |
40 |
| -); |
41 |
| -CREATE UNIQUE INDEX uniq_lk_lv_il ON linkis_ps_instance_label USING btree (label_key, label_value); |
42 |
| - |
43 |
| -DROP TABLE IF EXISTS "linkis_ps_instance_label_relation"; |
44 |
| -CREATE TABLE linkis_ps_instance_label_relation ( |
45 |
| - id serial NOT NULL, |
46 |
| - label_id int4 NULL, |
47 |
| - service_instance varchar(128) NOT NULL, |
48 |
| - update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
49 |
| - create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
50 |
| - CONSTRAINT linkis_instance_label_relation_pkey PRIMARY KEY (id) |
51 |
| -); |
52 |
| -CREATE UNIQUE INDEX uniq_lid_instance ON linkis_ps_instance_label_relation USING btree (label_id, service_instance); |
53 |
| - |
54 |
| - |
55 |
| -DROP TABLE IF EXISTS "linkis_ps_instance_label_value_relation"; |
56 |
| -CREATE TABLE linkis_ps_instance_label_value_relation ( |
57 |
| - id serial NOT NULL, |
58 |
| - label_value_key varchar(255) NOT NULL, |
59 |
| - label_value_content varchar(255) NULL, |
60 |
| - label_id int4 NULL, |
61 |
| - update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
62 |
| - create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
63 |
| - CONSTRAINT linkis_ps_instance_label_value_relation_pkey PRIMARY KEY (id) |
64 |
| -); |
65 |
| -CREATE UNIQUE INDEX uniq_lvk_lid_ilvr ON linkis_ps_instance_label_value_relation USING btree (label_value_key, label_id); |
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +DROP TABLE IF EXISTS "linkis_ps_instance_info"; |
| 19 | +CREATE TABLE linkis_ps_instance_info ( |
| 20 | + id serial NOT NULL, |
| 21 | + "instance" varchar(128) NULL, |
| 22 | + "name" varchar(128) NULL, |
| 23 | + update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 24 | + create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 25 | + CONSTRAINT linkis_instance_info_pkey PRIMARY KEY (id) |
| 26 | +); |
| 27 | +CREATE UNIQUE INDEX uniq_instance_ii ON linkis_ps_instance_info USING btree (instance); |
| 28 | + |
| 29 | + |
| 30 | +DROP TABLE IF EXISTS "linkis_ps_instance_label"; |
| 31 | +CREATE TABLE linkis_ps_instance_label ( |
| 32 | + id serial NOT NULL, |
| 33 | + label_key varchar(32) NOT NULL, |
| 34 | + label_value varchar(255) NOT NULL, |
| 35 | + label_feature varchar(16) NOT NULL, |
| 36 | + label_value_size int4 NOT NULL, |
| 37 | + update_time timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 38 | + create_time timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| 39 | + CONSTRAINT linkis_instance_label_pkey PRIMARY KEY (id) |
| 40 | +); |
| 41 | +CREATE UNIQUE INDEX uniq_lk_lv_il ON linkis_ps_instance_label USING btree (label_key, label_value); |
| 42 | + |
| 43 | +DROP TABLE IF EXISTS "linkis_ps_instance_label_relation"; |
| 44 | +CREATE TABLE linkis_ps_instance_label_relation ( |
| 45 | + id serial NOT NULL, |
| 46 | + label_id int4 NULL, |
| 47 | + service_instance varchar(128) NOT NULL, |
| 48 | + update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 49 | + create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 50 | + CONSTRAINT linkis_instance_label_relation_pkey PRIMARY KEY (id) |
| 51 | +); |
| 52 | +CREATE UNIQUE INDEX uniq_lid_instance ON linkis_ps_instance_label_relation USING btree (label_id, service_instance); |
| 53 | + |
| 54 | + |
| 55 | +DROP TABLE IF EXISTS "linkis_ps_instance_label_value_relation"; |
| 56 | +CREATE TABLE linkis_ps_instance_label_value_relation ( |
| 57 | + id serial NOT NULL, |
| 58 | + label_value_key varchar(255) NOT NULL, |
| 59 | + label_value_content varchar(255) NULL, |
| 60 | + label_id int4 NULL, |
| 61 | + update_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 62 | + create_time timestamp(6) NULL DEFAULT CURRENT_TIMESTAMP, |
| 63 | + CONSTRAINT linkis_ps_instance_label_value_relation_pkey PRIMARY KEY (id) |
| 64 | +); |
| 65 | +CREATE UNIQUE INDEX uniq_lvk_lid_ilvr ON linkis_ps_instance_label_value_relation USING btree (label_value_key, label_id); |
0 commit comments