Error after update from 2.5.0 -> 2.6.0

Hello, I am upgrading seatable from 2.5 to 2.6 and I have just downloaded latest docker image and make changes to the following in “docker-compose.yml” as following.
image

when i re run the docker , i do not see error,

but when i try to login using weburl, i am getting the following error.
image

some update on progress…

after i clear the browser, i am able to see the login page.

However, i wasnt able to log in using my old user account and password.

when i try to recrate admin account, i receive the following error.

Password:
Password (again):
Traceback (most recent call last):
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/cursors.py", line 319, in _query
    db.query(q)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/connections.py", line 259, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1054, "Unknown column 'profile_profile.unit' in 'field list'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/__init__.py", line 381, in execute_fro                                                                    m_command_line
    utility.execute()
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/opt/seatable/seatable-server-2.6.0/dtable-web/seahub/base/management/commands/createsuperuser.py", line 150, in handle
    User.objects.create_superuser(email, password)
  File "/opt/seatable/seatable-server-2.6.0/dtable-web/seahub/base/accounts.py", line 156, in create_superuser
    u = self.create_user(email, password, is_staff=True, is_active=True)
  File "/opt/seatable/seatable-server-2.6.0/dtable-web/seahub/base/accounts.py", line 76, in create_user
    Profile.objects.add_or_update(username=virtual_id, contact_email=email, need_show_video=True)
  File "/opt/seatable/seatable-server-2.6.0/dtable-web/seahub/profile/models.py", line 29, in add_or_update
    profile = self.get(user=username)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 402, in get
    num = len(clone)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 256, in __len__
    self._fetch_all()
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/sql/compiler.py", line 1142, in execute_sql
    cursor.execute(sql, params)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 76, in _execute_with_wrapp                                                                    ers
    return executor(sql, params, many, context)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/cursors.py", line 319, in _query
    db.query(q)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/MySQLdb/connections.py", line 259, in query
    _mysql.connection.query(self, query)
django.db.utils.OperationalError: (1054, "Unknown column 'profile_profile.unit' in 'field list'")
ben@ben:/opt/seatable$

I tried the EE upgrade to the latest (2.6.2) and I see the same error as above. Yes, I am using the license file and I modified the yml to seatable/seatable-enterprise:latest. I am unable to use the previous admin account and trying to create a new admin produces the above error. I have downgraded to 2.5.5 to keep SeaTable running for now. Can you let me know how to correctly upgrade EE to the latest?

Also what happens after 2 years of the EE license? Will it be automatically renewed?

Happy holidays to all you folks!!!

It is because you haven’t run the database upgrade statements:

CREATE TABLE IF NOT EXISTS `onlyoffice_doc_key` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `doc_key` varchar(36) NOT NULL,
  `username` varchar(255) NOT NULL,
  `repo_id` varchar(36) NOT NULL,
  `file_path` longtext NOT NULL,
  `repo_id_file_path_md5` varchar(100) NOT NULL,
  `created_time` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `onlyoffice_doc_key_doc_key_49b6ca92` (`doc_key`),
  KEY `onlyoffice_doc_key_repo_id_file_path_md5_27c46737` (`repo_id_file_path_md5`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `dtable_forms` CHANGE  `form_config` `form_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL;

ALTER TABLE `session_log` ADD COLUMN IF NOT EXISTS `session_key` varchar(40) NOT NULL AFTER `remote_address`, ADD KEY `session_key`(`session_key`);

ALTER TABLE `dtable_external_apps` ADD COLUMN IF NOT EXISTS `creator` varchar(255) DEFAULT NULL;

ALTER TABLE `profile_profile` ADD COLUMN IF NOT EXISTS `unit` longtext NULL;

ALTER TABLE `dtables` ADD INDEX IF NOT EXISTS `dtables_created_at_e6716f4b` (`created_at`);

@daniel.pan upgrading database solve the problem. May I know if i have to update database on every version upgrade? 2.4-> 2.5->2.6?

Apparently it works when i didn’t upgrade from 2.4-> 2.5.

Although i have to start upgrade from 2.4 to 2.6 in order to works.

Yes, I confirm… Upgrading the database worked for me. 2.5.5 → 2.6.2. I executed the below command as suggested in the upgrade manual… Oops… should have seen that DB upgrade is required for minor version upgrades as well (2.5.x to 2.6.y) !

mysql -h$DB_HOST -p$DB_ROOT_PASSWD dtable_db </opt/seatable/seatable-server-latest/sql/mysql/upgrade/2.6/dtable.sql

Thanks @daniel.pan !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.