Commit 1d4bcb86 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Changed sql_* to use an app config instead of a models module.

parent 38ce4110
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,5 +22,5 @@ class Command(AppCommand):
        if app_config.models_module is None:
            return
        connection = connections[options.get('database')]
        statements = sql_create(app_config.models_module, self.style, connection)
        statements = sql_create(app_config, self.style, connection)
        return '\n'.join(statements)
+1 −1
Original line number Diff line number Diff line
@@ -22,5 +22,5 @@ class Command(AppCommand):
        if app_config.models_module is None:
            return
        connection = connections[options.get('database')]
        statements = sql_all(app_config.models_module, self.style, connection)
        statements = sql_all(app_config, self.style, connection)
        return '\n'.join(statements)
+1 −1
Original line number Diff line number Diff line
@@ -22,5 +22,5 @@ class Command(AppCommand):
        if app_config.models_module is None:
            return
        connection = connections[options.get('database')]
        statements = sql_delete(app_config.models_module, self.style, connection)
        statements = sql_delete(app_config, self.style, connection)
        return '\n'.join(statements)
+1 −1
Original line number Diff line number Diff line
@@ -22,5 +22,5 @@ class Command(AppCommand):
        if app_config.models_module is None:
            return
        connection = connections[options.get('database')]
        statements = sql_custom(app_config.models_module, self.style, connection)
        statements = sql_custom(app_config, self.style, connection)
        return '\n'.join(statements)
+1 −1
Original line number Diff line number Diff line
@@ -23,5 +23,5 @@ class Command(AppCommand):
        if app_config.models_module is None:
            return
        connection = connections[options.get('database')]
        statements = sql_destroy_indexes(app_config.models_module, self.style, connection)
        statements = sql_destroy_indexes(app_config, self.style, connection)
        return '\n'.join(statements)
Loading