如何使用flask_sqlalchemy更改ms sql数据库的默认架构?

时间:2018-08-22 05:31:27

标签: sql-server flask flask-sqlalchemy

我的代码嗅探

from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy(app)
inspector = inspect(db.engine)

查看默认架构

print('Default schema: ', inspector.default_schema_name)

所有可用架构的列表

print('schema: ', inspector.get_schema_names())

输出: 默认架构:dbo

模式:['admin','db_accessadmin','db_backupoperator','db_datareader','db_datawriter','db_ddladmin','db_denydatareader','db_denydatawriter','db_owner','db_securityadmin','dbo', 'devops','goal','etl','etl_logging','etl_on','evil','guest','INFORMATION_SCHEMA','location','search','search_json','semantic','sys ','tms','tms_on','tvclient','util','abc','xyz']

我想使用abc模式。我该怎么办?

0 个答案:

没有答案