Browse Source

Drops depot global declaration in last migration

Adrien Panay 7 years ago
parent
commit
089bd059f5
1 changed files with 7 additions and 7 deletions
  1. 7 7
      tracim/migration/versions/913efdf409e5_all_files_also_on_disk.py

+ 7 - 7
tracim/migration/versions/913efdf409e5_all_files_also_on_disk.py View File

@@ -25,12 +25,6 @@ down_revision = '69fb10c3d6f0'
25 25
 # Session = sessionmaker()
26 26
 # DeclarativeBase = declarative_base()
27 27
 
28
-DepotManager.configure(
29
-    'default', {
30
-    'depot.storage_path': 'depot/',
31
-})
32
-# DepotManager.set_default('default')
33
-
34 28
 revision_helper = sa.Table(
35 29
     'content_revisions',
36 30
     sa.MetaData(),
@@ -105,8 +99,14 @@ def upgrade():
105 99
 
106 100
     # fill_depot_file_fields()
107 101
 
102
+    # Creates files depot used in this migration:
103
+    # - 'default': depot used until now,
104
+    DepotManager.configure(
105
+        'default', {'depot.storage_path': 'depot/'},
106
+    )
107
+    depot = DepotManager.get('default')
108
+
108 109
     connection = op.get_bind()
109
-    depot = DepotManager.get()
110 110
 
111 111
     file_revision_query = revision_helper.select() \
112 112
         .where(revision_helper.c.type == 'file')