forked from getredash/redash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added backend logic for dashboard options
- Loading branch information
1 parent
dec8cfe
commit 41ae2ce
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""empty message | ||
Revision ID: dfeaacdd7624 | ||
Revises: e5c7a4e2df4d | ||
Create Date: 2020-11-20 19:11:29.497508 | ||
""" | ||
import json | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
from redash.models import MutableDict, PseudoJSON | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'dfeaacdd7624' | ||
down_revision = 'e5c7a4e2df4d' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# create "dashboard options" column as a dict type | ||
op.add_column( | ||
"dashboards", | ||
sa.Column( | ||
"options", | ||
MutableDict.as_mutable(PseudoJSON), | ||
nullable=False, | ||
server_default=json.dumps({}), | ||
) | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column("dashboards", "options") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters