|
@@ -20,8 +20,14 @@ class MigrationHandlerError(Exception):
|
20
|
20
|
class MigrationHandler(object):
|
21
|
21
|
|
22
|
22
|
## @brief Constructs a MongoDbMigrationHandler
|
23
|
|
- # @param conn_args dict : a dictionary containing the connection options
|
24
|
|
- # @param **kwargs : extra arguments
|
|
23
|
+ # @param host str
|
|
24
|
+ # @param port str
|
|
25
|
+ # @param db_name str
|
|
26
|
+ # @param username str
|
|
27
|
+ # @param password str
|
|
28
|
+ # @param charset str
|
|
29
|
+ # @param dry_run bool
|
|
30
|
+ # @param drop_if_exists bool : drops the table if it already exists
|
25
|
31
|
def __init__(self, host, port, db_name, username, password,
|
26
|
32
|
charset='utf-8', dry_run = False, drop_if_exists = False):
|
27
|
33
|
|
|
@@ -41,7 +47,6 @@ class MigrationHandler(object):
|
41
|
47
|
|
42
|
48
|
## @brief Creates a collection in the database
|
43
|
49
|
# @param collection_name str
|
44
|
|
- # @param charset str : default value is "utf8"
|
45
|
50
|
def _create_collection(self, collection_name):
|
46
|
51
|
existing = self.database.collection_names(
|
47
|
52
|
include_system_collections=False)
|