Skip to content

Commit

Permalink
v12: update migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Jun 20, 2024
1 parent 3091492 commit 09c21bf
Showing 1 changed file with 38 additions and 9 deletions.
47 changes: 38 additions & 9 deletions docs/releases/upgrading/upgrade-v12.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ You should delete your virtualenv before running `invenio-cli` or `pipenv` comma

### Upgrade InvenioRDM

Make sure that your virtual env is now running with Python 3.9. InvenioRDM v12
is also tested with Python 3.12.
Make sure that your virtual env is now running with at least Python 3.9. (InvenioRDM v12
is also tested with Python 3.12.)

Upgrade the RDM version:
There are two options to upgrade your system.

#### Option 1

This approach upgrades the dependencies in place. Your virtual environment for the
v11 version will be gone afterwards.

```bash
cd <my-site>
Expand All @@ -62,20 +67,47 @@ pipenv uninstall flask-babelex
invenio-cli assets build
```

Optionally, update the file `<my-site>/Pipfile`.
#### Option 2

This approach will create a new virtual environment and leafs the v11 as it is.
If you are using a docker image on your production instance this will be the
option you chose.

##### Step 1
- create a new virtual environment
- activate your new virtual environment
- install `invenio-cli` by `pip install invenio-cli`

##### Step 2
Update the file `<my-site>/Pipfile`.

```diff
[packages]
---invenio-app-rdm = {extras = [...], version = "~=11.0.0"}
+++invenio-app-rdm = {extras = [...], version = "~=12.0.0"}
```

Due to a dependency upgrade update following line.
Due to a dependency upgrade, update the following line.
```diff
---my-site = {editable="True", path="./site"}
+++my-site = {editable=true, path="./site"}
```

##### Step 3
Update the `Pipfile.lock` file

```bash
invenio-cli packages lock
```

##### Step 4
install InvenioRDM v12

```bash
invenio-cli install
```


### Database migration

Execute the database migration:
Expand Down Expand Up @@ -121,11 +153,8 @@ pipenv run invenio shell $(find $(pipenv --venv)/lib/*/site-packages/invenio_app
```bash
invenio index destroy --yes-i-know
invenio index init
invenio rdm-records rebuild-index
invenio community rebuild-index
# TODO rebuild users
# TODO rebuild groups
# TODO rebuild community members
invenio rdm rebuild-all-indices
```

### New roles
Expand Down

0 comments on commit 09c21bf

Please sign in to comment.