|
a/Allura/allura/migrations.py |
|
b/Allura/allura/migrations.py |
|
... |
|
... |
11 |
from forgewiki import model as WM
|
11 |
from forgewiki import model as WM
|
12 |
from forgediscussion import model as DM
|
12 |
from forgediscussion import model as DM
|
13 |
from forgegit import model as GitM
|
13 |
from forgegit import model as GitM
|
14 |
from forgehg import model as HgM
|
14 |
from forgehg import model as HgM
|
15 |
from forgesvn import model as SVNM
|
15 |
from forgesvn import model as SVNM
|
|
|
16 |
|
|
|
17 |
STATS_COLLECTION_SIZE=100000
|
|
|
18 |
|
|
|
19 |
class CreateStatsCollection(Migration):
|
|
|
20 |
version = 13
|
|
|
21 |
|
|
|
22 |
def up(self):
|
|
|
23 |
if self.session.db.name == 'allura':
|
|
|
24 |
self.session.db.create_collection(
|
|
|
25 |
M.Stats.__mongometa__.name,
|
|
|
26 |
capped=True,
|
|
|
27 |
size=STATS_COLLECTION_SIZE*10,
|
|
|
28 |
max=STATS_COLLECTION_SIZE)
|
|
|
29 |
|
|
|
30 |
def down(self):
|
|
|
31 |
if self.session.db.name == 'allura':
|
|
|
32 |
self.session.db.drop_collection(
|
|
|
33 |
M.Stats.__mongometa__.name)
|
16 |
|
34 |
|
17 |
class DeleteFlashMailboxes(Migration):
|
35 |
class DeleteFlashMailboxes(Migration):
|
18 |
version = 12
|
36 |
version = 12
|
19 |
|
37 |
|
20 |
def up(self):
|
38 |
def up(self):
|