|
|
@@ -1,29 +0,0 @@
|
|
1
|
|
-#!/usr/bin/env python
|
|
2
|
|
-"""
|
|
3
|
|
-Convenience script to create migrations
|
|
4
|
|
-"""
|
|
5
|
|
-from optparse import OptionParser
|
|
6
|
|
-
|
|
7
|
|
-from tests.config import configure
|
|
8
|
|
-configure()
|
|
9
|
|
-
|
|
10
|
|
-
|
|
11
|
|
-def create_migration(app_label, **kwargs):
|
|
12
|
|
- from south.management.commands.schemamigration import Command
|
|
13
|
|
- com = Command()
|
|
14
|
|
- com.handle(app=app_label, **kwargs)
|
|
15
|
|
-
|
|
16
|
|
-
|
|
17
|
|
-if __name__ == '__main__':
|
|
18
|
|
- parser = OptionParser()
|
|
19
|
|
- parser.add_option('-i', '--initial', dest='initial',
|
|
20
|
|
- action='store_true', default=False)
|
|
21
|
|
- parser.add_option('-a', '--auto', dest='auto',
|
|
22
|
|
- action='store_true', default=False)
|
|
23
|
|
- parser.add_option('-e', '--empty', dest='empty',
|
|
24
|
|
- action='store_true', default=False)
|
|
25
|
|
- parser.add_option('-n', '--name', dest='name', default='')
|
|
26
|
|
- (options, args) = parser.parse_args()
|
|
27
|
|
- create_migration(args[0], initial=options.initial,
|
|
28
|
|
- auto=options.auto, empty=options.empty,
|
|
29
|
|
- name=options.name)
|