Browse Source

job_jdbc_datasource add tag

李卫全 2 năm trước cách đây
mục cha
commit
6cc3720c86

+ 2 - 0
app/models/job_jdbc_datasource.py

@@ -33,4 +33,6 @@ class JobJdbcDatasource(BaseModel):
     update_by = Column(String)
     # 备注
     comments = Column(String)
+    # 标签
+    tag = Column(String)
 

+ 9 - 2
app/schemas/job_jdbc_datasouce.py

@@ -18,6 +18,8 @@ class JobJdbcDatasourceBase(BaseModel):
     jdbc_url: str
     # 备注
     comments: str
+    # 标签
+    tag: str
     class Config:
         schema_extra = {
             # "example": {
@@ -27,7 +29,8 @@ class JobJdbcDatasourceBase(BaseModel):
             #     "jdbc_username": 'root',
             #     "jdbc_password": 'happylay',
             #     "jdbc_url": '192.168.199.107:10086',
-            #     "comments": 'This is a very nice Item'
+            #     "comments": 'This is a very nice Item',
+            #     "tag": '线下'
             # }
             "example": {
                 "datasource_name": 'testhive',
@@ -37,6 +40,7 @@ class JobJdbcDatasourceBase(BaseModel):
                 "jdbc_password": '',
                 "jdbc_url": '192.168.199.107:10000',
                 "comments": 'This is a very nice Item',
+                "tag": '线下',
             }
         }
 
@@ -56,7 +60,9 @@ class JobJdbcDatasourceUpdate(JobJdbcDatasourceBase):
             #     "jdbc_username": 'root',
             #     "jdbc_password": 'happylay',
             #     "jdbc_url": '192.168.199.107:10086',
-            #     "comments": 'This is a very nice Item'
+            #     "comments": 'This is a very nice Item',
+            #     "tag": '线下',
+            #     "status": 1,
             # }
             "example": {
                 "datasource_name": 'testhive',
@@ -66,6 +72,7 @@ class JobJdbcDatasourceUpdate(JobJdbcDatasourceBase):
                 "jdbc_password": '',
                 "jdbc_url": '192.168.199.107:10000',
                 "comments": 'This is a very nice Item',
+                "tag": '线下',
                 "status": 1,
             }
         }

+ 1 - 1
data/data.sql

@@ -57,5 +57,5 @@ CREATE TABLE `job_info`  (
 -- ----------------------------
 -- Alter Table structure for job_jdbc_datasource
 -- ----------------------------
-ALTER TABLE `aihubtest_dag_admin_db`.`job_jdbc_datasource`
+ALTER TABLE `job_jdbc_datasource`
 ADD COLUMN `tag` varchar(20) NULL COMMENT '标签: 0开发1测试2开发' AFTER `comments`;

+ 9 - 3
production.ini

@@ -1,6 +1,12 @@
+; [DATABASE]
+; user = root
+; pwd = happylay
+; db_name = datax_web_dev
+; host = 192.168.199.107
+; port = 10086
 [DATABASE]
-user = aihubtest_dag_admin_db
-pwd = aihubtest
-db_name = q9WBYDynEy@jh#5N
+user = aihubtest
+pwd = q9WBYDynEy@jh#5N
+db_name = aihubtest_dag_admin_db
 host = 10.254.12.7
 port = 3306

+ 7 - 7
requirements.txt

@@ -1,7 +1,7 @@
-fastapi_pagination=0.9.3
-pymysql=1.0.2
-PyHive=0.6.5
-pure-sasl=0.6.2
-sasl=0.3.1
-thrift=0.16.0
-thrift-sasl=0.4.3
+fastapi_pagination==0.9.3
+pymysql==1.0.2
+PyHive==0.6.5
+pure-sasl==0.6.2
+sasl==0.3.1
+thrift==0.16.0
+thrift-sasl==0.4.3