It's a problem in Django on Ubuntu 22 and the spatialite version shipped by default in Ubuntu 22: https://code.djangoproject.com/ticket/32935
Best regards *Federico Capoano* OpenWISP OÜ Harjumaa, Tallinn, Sepapaja tn 6, 15551 VAT: EE101989729 *openwisp.io* <http://openwisp.io> On Mon, 13 Feb 2023 at 07:07, Prabhat Sinha <[email protected]> wrote: > I have facing following error during migration "python3 manage.py migrate" > > Operations to perform: > Apply all migrations: account, admin, auth, authtoken, check, config, > connection, contenttypes, device_monitoring, geo, monitoring, > openwisp_ipam, openwisp_notifications, openwisp_users, pki, reversion, > sessions, sites, socialaccount > Running migrations: > Applying contenttypes.0002_remove_content_type_name...Traceback (most > recent call last): > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 89, in _execute > return self.cursor.execute(sql, params) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", > line 477, in execute > return Database.Cursor.execute(self, query, params) > sqlite3.OperationalError: error in trigger > ISO_metadata_reference_row_id_value_insert: no such column: rowid > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "/home/prabhat/openwisp-monitoring/tests/manage.py", line 10, in > <module> > execute_from_command_line(sys.argv) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/__init__.py", > line 446, in execute_from_command_line > utility.execute() > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/__init__.py", > line 440, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/base.py", > line 414, in run_from_argv > self.execute(*args, **cmd_options) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/base.py", > line 460, in execute > output = self.handle(*args, **options) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/base.py", > line 98, in wrapped > res = handle_func(*args, **kwargs) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", > line 290, in handle > post_migrate_state = executor.migrate( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", > line 131, in migrate > state = self._migrate_all_forwards( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", > line 163, in _migrate_all_forwards > state = self.apply_migration( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", > line 248, in apply_migration > state = migration.apply(state, schema_editor) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/migrations/migration.py", > line 131, in apply > operation.database_forwards( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/migrations/operations/fields.py", > line 235, in database_forwards > schema_editor.alter_field(from_model, from_field, to_field) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", > line 172, in alter_field > super().alter_field(model, old_field, new_field, strict=strict) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/base/schema.py", > line 747, in alter_field > self._alter_field( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", > line 432, in _alter_field > self._remake_table(model, alter_field=(old_field, new_field)) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", > line 340, in _remake_table > self.alter_db_table( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/contrib/gis/db/backends/spatialite/schema.py", > line 153, in alter_db_table > super().alter_db_table(model, old_db_table, new_db_table, > disable_constraints) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/schema.py", > line 119, in alter_db_table > super().alter_db_table(model, old_db_table, new_db_table) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/base/schema.py", > line 567, in alter_db_table > self.execute( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/base/schema.py", > line 192, in execute > cursor.execute(sql, params) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 103, in execute > return super().execute(sql, params) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 67, in execute > return self._execute_with_wrappers( > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 80, in _execute_with_wrappers > return executor(sql, params, many, context) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 84, in _execute > with self.db.wrap_database_errors: > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/utils.py", > line 91, in __exit__ > raise dj_exc_value.with_traceback(traceback) from exc_value > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/utils.py", > line 89, in _execute > return self.cursor.execute(sql, params) > File > "/home/prabhat/.local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", > line 477, in execute > return Database.Cursor.execute(self, query, params) > django.db.utils.OperationalError: error in trigger > ISO_metadata_reference_row_id_value_insert: no such column: rowid > > -- > You received this message because you are subscribed to the Google Groups > "OpenWISP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/openwisp/843e5b51-9d66-4a12-888e-967a8dbbacfen%40googlegroups.com > <https://groups.google.com/d/msgid/openwisp/843e5b51-9d66-4a12-888e-967a8dbbacfen%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAAGgX6KmoZQ1KftraWN%2BzPFzu%2BBGcFMsmSiT_RXdYWdbpKE6UA%40mail.gmail.com.
