mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2025-10-28 20:43:38 +08:00
feat: 允许通过参数转换自定义数据库脚本文件
This commit is contained in:
@ -919,9 +919,15 @@ def main():
|
|||||||
help="目标数据库类型",
|
help="目标数据库类型",
|
||||||
choices=["postgres", "oracle", "sqlserver", "dm8", "kingbase", "opengauss"],
|
choices=["postgres", "oracle", "sqlserver", "dm8", "kingbase", "opengauss"],
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"path",
|
||||||
|
type=str,
|
||||||
|
help="源数据库脚本路径",
|
||||||
|
default="../mysql/ruoyi-vue-pro.sql"
|
||||||
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
sql_file = pathlib.Path("../mysql/ruoyi-vue-pro.sql").resolve().as_posix()
|
sql_file = pathlib.Path(arg.path).resolve().as_posix()
|
||||||
convertor = None
|
convertor = None
|
||||||
if args.type == "postgres":
|
if args.type == "postgres":
|
||||||
convertor = PostgreSQLConvertor(sql_file)
|
convertor = PostgreSQLConvertor(sql_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user