mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 17:15:17 +00:00
accca51f39
* Web interface to add and delete data sources, without the need to ssh into the server. * Ability to safely delete datasources -- query results from this data sources are deleted, while queries get assigned null datasource. * Updated the BigQuery datasource to use the JSON key file from Google Developer console. Also both BigQuery and the Google Spreadsheets datasource no longer store their key on the filesystem, but rather in the DB. * Minor updates to the Flask Admin.
19 lines
339 B
Python
19 lines
339 B
Python
from playhouse.migrate import PostgresqlMigrator, migrate
|
|
|
|
from redash.models import db
|
|
|
|
if __name__ == '__main__':
|
|
db.connect_db()
|
|
migrator = PostgresqlMigrator(db.database)
|
|
|
|
with db.database.transaction():
|
|
migrate(
|
|
migrator.drop_not_null('queries', 'data_source_id'),
|
|
)
|
|
|
|
db.close_db(None)
|
|
|
|
|
|
|
|
|