forked from apache/superset
-
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.
[logs] Dropping dt column (apache#4587)
- Loading branch information
1 parent
73e6cb9
commit 69e3f32
Showing
6 changed files
with
29 additions
and
23 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
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,26 @@ | ||
"""empty message | ||
Revision ID: 30bb17c0dc76 | ||
Revises: f231d82b9b26 | ||
Create Date: 2018-04-08 07:34:12.149910 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '30bb17c0dc76' | ||
down_revision = 'f231d82b9b26' | ||
|
||
from datetime import date | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('logs') as batch_op: | ||
batch_op.drop_column('dt') | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('logs') as batch_op: | ||
batch_op.add_column(sa.Column('dt', sa.Date, default=date.today())) |
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
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