Browse Source

Merge branch 'newlodel' of git.labocleo.org:lodel2 into newlodel

prieto 8 years ago
parent
commit
d4a5ee3433
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      scripts/admin.py

+ 5
- 0
scripts/admin.py View File

@@ -2,6 +2,7 @@
2 2
 
3 3
 import sys
4 4
 import os, os.path
5
+from plugins.mongodb_datasource.migration_handler import MongoDbMigrationHandler
5 6
 
6 7
 sys.path.append(os.path.dirname(os.getcwd()+'/..'))
7 8
 from lodel.settings.settings import Settings as settings
@@ -22,3 +23,7 @@ def refresh_dyncode(model_file, translator, output_filename):
22 23
         out_fd.write(dyncode)
23 24
     out_fd.close()
24 25
 
26
+def init_db(conn_args):
27
+    migration_handler = MongoDbMigrationHandler(conn_args=conn_args)
28
+    migration_handler._install_collections()
29
+    migration_handler.database.close()

Loading…
Cancel
Save