Commits

Garth Johnson committed 78c06c6

Inital update options added to handel database creation on existing installations

Comments (0)

Files changed (3)

 ======================
 
 TBD
+
+Changelog
+=========
+0.0.5a1 - Added support for initial update to an existing instance with pre-existing sites.

djaboto/__init__.py

 # -*- coding: utf-8 -*-
-VERSION = (0,0,4,'alpha',4)
+VERSION = (0,0,5,'alpha',1)
 
 def get_version(version=None):
     """Derives a PEP386-compliant version number from VERSION."""

djaboto/management/commands/aws.py

             dest='awsreinstall',
             help='Force re-installation mode for remote aws python instance',
         ),
+        optparse.make_option('--initial',
+            action='store_true',
+            dest='initial',
+            help='Initial install - drops existing data and creates empty database',
+        ),
         optparse.make_option('--updateos',
             action='store_true',
             dest='updateos',
                 self.set_awsPermissions()
                 self.set_awsApacheconf(options.get('domain', None))
                 reboot=True
+            elif 'dropdb' in args:
+                self.aws_DropDB()
+                self.sync_awsDB()
             elif 'update' in args:
                 if options.get('updateos', False):
                     self.install_awsUbuntuUpgrades()
                 if options.get('updatepy', False):
                     self.install_awsPythonRequirements(reinstall=options.get('awsreinstall', False))
                 #self.sync_awsPurify() #we would only need this if we were moving the database back and forth
+                if options.get('initial', False):
+                    self.aws_DropDB()
                 self.sync_awsDB()
-                if options.get('updatepy', False):
+                if options.get('updatepy', False) or options.get('initial', False):
                     self.sync_awsStaticfiles()
+                if options.get('initial', False):
+                    self.set_awsPermissions()
+                    self.set_awsApacheconf(options.get('domain', None))
                 self.set_awsPermissions()
             elif 'perms' in args:
                 self.set_awsPermissions()