From 646640da5cec286ed59a99af8039f5f5feabec47 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 13 Feb 2016 10:59:08 +0100 Subject: The date of modification of articles is now used to detect changes. --- ...686_add_updated_date_column_to_article_table.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 migrations/versions/7f973d010686_add_updated_date_column_to_article_table.py (limited to 'migrations') diff --git a/migrations/versions/7f973d010686_add_updated_date_column_to_article_table.py b/migrations/versions/7f973d010686_add_updated_date_column_to_article_table.py new file mode 100644 index 00000000..6e12964f --- /dev/null +++ b/migrations/versions/7f973d010686_add_updated_date_column_to_article_table.py @@ -0,0 +1,24 @@ +"""add updated_date column to article table + +Revision ID: 7f973d010686 +Revises: 25ca960a207 +Create Date: 2016-02-12 21:51:40.868539 + +""" + +# revision identifiers, used by Alembic. +revision = '7f973d010686' +down_revision = '25ca960a207' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.add_column('article', sa.Column('updated_date', sa.DateTime(), nullable=True)) + + +def downgrade(): + op.drop_column('article', 'updated_date') -- cgit