Revision df285bb3 snf-app/docs/src/develop.rst

b/snf-app/docs/src/develop.rst
99 99

  
100 100
* Initialize database::
101 101

  
102
  (synnefo-env)$ synnefo-manage syndb
103
  (synnefo-env)$ synnefo-manage migrate
104
  (synnefo-env)$ synnefo-manage loaddata users flavors images
102
  (synnefo-env)$ snf-manage syndb
103
  (synnefo-env)$ snf-manage migrate
104
  (synnefo-env)$ snf-manage loaddata users flavors images
105 105

  
106 106

  
107 107
Development tips
......
109 109

  
110 110
* Running a development web server::
111 111

  
112
  (synnefo-env)$ synnefo-manage runserver
112
  (synnefo-env)$ snf-manage runserver
113 113

  
114 114
  or, if you have django_extensions and werkzeug packages installed::
115 115

  
116
  (synnefo-env)$ synnefo-manage runserver_plus
116
  (synnefo-env)$ snf-manage runserver_plus
117 117

  
118 118

  
119 119
* Opening a python console with synnefo environment initialized::
120 120

  
121
  (synnefo-env)$ synnefo-manage shell
121
  (synnefo-env)$ snf-manage shell
122 122

  
123 123
  or, if you have django_extensions package installed::
124 124

  
125
  (synnefo-env)$ synnefo-manage shell_plus
125
  (synnefo-env)$ snf-manage shell_plus
126 126

  
127 127

  
128 128
South Database Migrations
......
134 134
To initialise south migrations in your database the following commands must be
135 135
executed::
136 136

  
137
    $ synnefo-manage syncdb       # Create / update the database with the south tables
138
    $ synnefo-manage migrate db   # Perform migration in the database
137
    $ snf-manage syncdb       # Create / update the database with the south tables
138
    $ snf-manage migrate db   # Perform migration in the database
139 139

  
140 140
Note that syncdb will create the latest models that exist in the db app, so some
141 141
migrations may fail.  If you are sure a migration has already taken place you
......
143 143

  
144 144
For example::
145 145

  
146
    $ synnefo-manage migrate db 0001 --fake
146
    $ snf-manage migrate db 0001 --fake
147 147

  
148 148
To be sure that all migrations are applied type::
149 149

  
150
    $ synnefo-manage migrate db --list
150
    $ snf-manage migrate db --list
151 151

  
152 152
All starred migrations are applied.
153 153

  
......
165 165
Every time you make changes to the database and data migration is not required
166 166
(WARNING: always perform this with extreme care)::
167 167

  
168
    $ synnefo-manage schemamigration db --auto
168
    $ snf-manage schemamigration db --auto
169 169

  
170 170
The above will create the migration script. Now this must be applied to the live
171 171
database::
172 172

  
173
    $ synnefo-manage migrate db
173
    $ snf-manage migrate db
174 174

  
175 175
Consider this example (adding a field to the SynnefoUser model)::
176 176

  
......
240 240

  
241 241
    4. To migrate the database to the latest version, we execute::
242 242

  
243
        $ synnefo-manage migrate db
243
        $ snf-manage migrate db
244 244

  
245 245
    To see which migrations are applied::
246 246

  
247
          $ synnefo-manage migrate db --list
247
          $ snf-manage migrate db --list
248 248

  
249 249
          db
250 250
            (*) 0001_initial

Also available in: Unified diff