130 `myblog` cube, so if we don't do anything there is no way that we'll see anything |
130 `myblog` cube, so if we don't do anything there is no way that we'll see anything |
131 changing in the instance. |
131 changing in the instance. |
132 |
132 |
133 One easy way, as we've no really valuable data in the instance would be to trash and recreated it:: |
133 One easy way, as we've no really valuable data in the instance would be to trash and recreated it:: |
134 |
134 |
135 cubicweb-ctl stop myblog |
135 cubicweb-ctl stop myblog # or Ctrl-C in the terminal running the server in debug mode |
136 cubicweb-ctl delete myblog |
136 cubicweb-ctl delete myblog |
137 cubicweb-ctl create myblog |
137 cubicweb-ctl create myblog |
|
138 cubicweb-ctl start -D myblog |
138 |
139 |
139 Another way is to add our cube to the instance using the cubicweb-ctl shell |
140 Another way is to add our cube to the instance using the cubicweb-ctl shell |
140 facility. It's a python shell connected to the instance with some special |
141 facility. It's a python shell connected to the instance with some special |
141 commands available to manipulate it (the same as you'll have in migration |
142 commands available to manipulate it (the same as you'll have in migration |
142 scripts, which are not covered in this tutorial). In that case, we're interested |
143 scripts, which are not covered in this tutorial). In that case, we're interested |
143 in the `add_cube` command: :: |
144 in the `add_cube` command: :: |
144 |
145 |
145 $ cubicweb-ctl stop myblog |
146 $ cubicweb-ctl stop myblog # or Ctrl-C in the terminal running the server in debug mode |
146 $ cubicweb-ctl shell myblog |
147 $ cubicweb-ctl shell myblog |
147 entering the migration python shell |
148 entering the migration python shell |
148 just type migration commands or arbitrary python code and type ENTER to execute it |
149 just type migration commands or arbitrary python code and type ENTER to execute it |
149 type "exit" or Ctrl-D to quit the shell and resume operation |
150 type "exit" or Ctrl-D to quit the shell and resume operation |
150 >>> add_cube('myblog') |
151 >>> add_cube('myblog') |
151 >>> |
152 >>> |
|
153 $ cubicweb-ctl start -D myblog |
152 |
154 |
153 The `add_cube` command is enough since it automatically updates our |
155 The `add_cube` command is enough since it automatically updates our |
154 application to the cube's schema. There are plenty of other migration |
156 application to the cube's schema. There are plenty of other migration |
155 commands of a more finer grain. They are described in :ref:`migration` |
157 commands of a more finer grain. They are described in :ref:`migration` |
156 |
158 |