aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-02 18:56:27 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-02 18:56:27 +0200
commitb43010d2da88d91e8934ba7214a823453cbf6031 (patch)
tree6e8e1fd8d45832a59f8ec37e2009cc68069f2375 /migrations
parentDisplay a picto when a feed is disabled due to errors when retrieving. (diff)
parentusing conf.DEFAULT_MAX_ERROR in feed template (diff)
downloadnewspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.gz
newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.tar.bz2
newspipe-b43010d2da88d91e8934ba7214a823453cbf6031.zip
Merged in jaesivsm/pyaggr3g470r (pull request #14)
Master
Diffstat (limited to 'migrations')
-rw-r--r--migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py19
-rw-r--r--migrations/versions/422da2d0234_adding_filters_field.py22
-rw-r--r--migrations/versions/48f561c0ce6_add_column_entry_id.py4
-rw-r--r--migrations/versions/cde34831ea_adding_feed_and_user_attributes_for_.py13
4 files changed, 44 insertions, 14 deletions
diff --git a/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py b/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
index e7790b3f..035646c6 100644
--- a/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
+++ b/migrations/versions/17dcb75f3fe_changed_the_type_of_the_column_last_.py
@@ -10,20 +10,25 @@ Create Date: 2015-03-10 14:20:53.676344
revision = '17dcb75f3fe'
down_revision = 'cde34831ea'
+from datetime import datetime
+import conf
from alembic import op
import sqlalchemy as sa
-from datetime import datetime
def upgrade():
unix_start = datetime(1970, 1, 1)
- op.drop_column('feed', 'last_modified')
- op.add_column('feed', sa.Column('last_modified', sa.String(),
- nullable=True, default=unix_start, server_default=str(unix_start)))
+ if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
+ op.drop_column('feed', 'last_modified')
+ op.add_column('feed', sa.Column('last_modified', sa.String(),
+ nullable=True, default=unix_start,
+ server_default=str(unix_start)))
def downgrade():
unix_start = datetime(1970, 1, 1)
- op.drop_column('feed', 'last_modified')
- op.add_column('feed', sa.Column('last_modified', sa.DateTime(),
- nullable=True, default=unix_start, server_default=unix_start))
+ if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
+ op.drop_column('feed', 'last_modified')
+ op.add_column('feed', sa.Column('last_modified', sa.DateTime(),
+ nullable=True, default=unix_start,
+ server_default=unix_start))
diff --git a/migrations/versions/422da2d0234_adding_filters_field.py b/migrations/versions/422da2d0234_adding_filters_field.py
new file mode 100644
index 00000000..bcbdf042
--- /dev/null
+++ b/migrations/versions/422da2d0234_adding_filters_field.py
@@ -0,0 +1,22 @@
+"""adding filters field
+
+Revision ID: 422da2d0234
+Revises: 17dcb75f3fe
+Create Date: 2015-05-18 23:03:15.809549
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '422da2d0234'
+down_revision = '17dcb75f3fe'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ op.add_column('feed', sa.Column('filters', sa.PickleType(), nullable=True))
+
+
+def downgrade():
+ op.drop_column('feed', 'filters')
diff --git a/migrations/versions/48f561c0ce6_add_column_entry_id.py b/migrations/versions/48f561c0ce6_add_column_entry_id.py
index e5bc5735..f464849a 100644
--- a/migrations/versions/48f561c0ce6_add_column_entry_id.py
+++ b/migrations/versions/48f561c0ce6_add_column_entry_id.py
@@ -12,6 +12,7 @@ down_revision = None
branch_labels = None
depends_on = None
+import conf
from alembic import op
import sqlalchemy as sa
@@ -21,4 +22,5 @@ def upgrade():
def downgrade():
- op.drop_column('article', 'entry_id')
+ if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
+ op.drop_column('article', 'entry_id')
diff --git a/migrations/versions/cde34831ea_adding_feed_and_user_attributes_for_.py b/migrations/versions/cde34831ea_adding_feed_and_user_attributes_for_.py
index 03e96564..116fdaa1 100644
--- a/migrations/versions/cde34831ea_adding_feed_and_user_attributes_for_.py
+++ b/migrations/versions/cde34831ea_adding_feed_and_user_attributes_for_.py
@@ -34,10 +34,11 @@ def upgrade():
def downgrade():
# commands auto generated by Alembic - please adjust! ###
- op.drop_column('user', 'refresh_rate')
- op.drop_column('feed', 'last_modified')
- op.drop_column('feed', 'last_error')
- op.drop_column('feed', 'error_count')
- op.drop_column('feed', 'last_retrieved')
- op.drop_column('feed', 'etag')
+ if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
+ op.drop_column('user', 'refresh_rate')
+ op.drop_column('feed', 'last_modified')
+ op.drop_column('feed', 'last_error')
+ op.drop_column('feed', 'error_count')
+ op.drop_column('feed', 'last_retrieved')
+ op.drop_column('feed', 'etag')
# end Alembic commands ###
bgstack15