forked from mozilla-services/socorro
-
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.
fix bug 1035957 - correct received_at column
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
alembic/versions/391e42da94dd_bug_1035957_use_literal_now_for_.py
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,29 @@ | ||
"""bug 1035957 - use literal NOW() for received_at, do not evaluate at migration time | ||
Revision ID: 391e42da94dd | ||
Revises: 495bf3fcdb63 | ||
Create Date: 2014-07-08 10:55:04.115932 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '391e42da94dd' | ||
down_revision = '495bf3fcdb63' | ||
|
||
from alembic import op | ||
from socorro.lib import citexttype, jsontype, buildtype | ||
from socorro.lib.migrations import fix_permissions, load_stored_proc | ||
|
||
import sqlalchemy as sa | ||
from sqlalchemy import types | ||
from sqlalchemy.dialects import postgresql | ||
from sqlalchemy.sql import table, column | ||
|
||
|
||
def upgrade(): | ||
op.alter_column(u'raw_adi', u'received_at', server_default=sa.text('NOW()')), | ||
|
||
|
||
def downgrade(): | ||
op.alter_column(u'raw_adi', u'received_at', server_default='2014-06-24 00:29:17.218147+00'), |