Browse Source

Drop create_migration.py helper

The helper set up the environment for tests and then created the
migration. This can lead to subtle bugs if the test environment is
overriding models etc.

The helper is dropped to make creating migrations more explicit.
master
Maik Hoepfel 12 years ago
parent
commit
ee3ee02aeb
1 changed files with 0 additions and 29 deletions
  1. 0
    29
      create_migration.py

+ 0
- 29
create_migration.py View File

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)

Loading…
Cancel
Save