Error when trying to upgrade to v0.20
It complains on not having enough privileges to create extension
root@bulldozer:/srv/funkwhale# sudo -u funkwhale -H -E /srv/funkwhale/virtualenv/bin/python api/manage.py migrate
2019-10-04 21:10:57,129 funkwhale_api.config INFO Loaded env file at /srv/funkwhale/config/.env
2019-10-04 21:10:57,130 funkwhale_api.config INFO Running with no plugins
:0: UserWarning: You do not have a working installation of the service_identity module: 'No module named 'service_identity''. Please install i
t from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied. Without the service_identity modul
e, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
Operations to perform:
Apply all migrations: account, admin, auth, authtoken, common, contenttypes, dynamic_preferences, favorites, federation, history, moderation,
music, playlists, radios, requests, sessions, sites, socialaccount, tags, users
Running migrations:
Applying common.0003_cit_extension...Traceback (most recent call last):
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.InsufficientPrivilege: se ha denegado el permiso para crear la extensión «citext»
HINT: Debe ser superusuario para crear esta extensión.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "api/manage.py", line 20, in <module>
execute_from_command_line(sys.argv)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 234, in handle
fake_initial=fake_initial,
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/srv/funkwhale/api/funkwhale_api/common/migrations/0003_cit_extension.py", line 15, in database_forwards
return super().database_forwards(app_label, schema_editor, from_state, to_state)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/contrib/postgres/operations.py", line 19, in database_forwards
schema_editor.execute("CREATE EXTENSION IF NOT EXISTS %s" % schema_editor.quote_name(self.name))
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/base/schema.py", line 137, in execute
cursor.execute(sql, params)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: se ha denegado el permiso para crear la extensión «citext»
HINT: Debe ser superusuario para crear esta extensión.
Edited by Agate