mirror of
https://github.com/apache/superset.git
synced 2026-04-22 17:45:21 +00:00
Require the SQLAlchemy URI on the database model (#8720)
* Require the SQLAlchemy URI when creating a database * Add migration to make dbs.sqlalchemy_uri not-nullable * Fixes for black, isort, tests * Alter migration to use current revision from master as downgrade target * Update tests to support new db constraint * black
This commit is contained in:
committed by
Maxime Beauchemin
parent
a96eae46af
commit
ed54f6ec8d
@@ -766,7 +766,7 @@ class Database(
|
||||
verbose_name = Column(String(250), unique=True)
|
||||
# short unique name, used in permissions
|
||||
database_name = Column(String(250), unique=True, nullable=False)
|
||||
sqlalchemy_uri = Column(String(1024))
|
||||
sqlalchemy_uri = Column(String(1024), nullable=False)
|
||||
password = Column(EncryptedType(String(1024), config["SECRET_KEY"]))
|
||||
cache_timeout = Column(Integer)
|
||||
select_as_create_table_as = Column(Boolean, default=False)
|
||||
|
||||
Reference in New Issue
Block a user