Is my DB messed up, can't find Event table in seahub-db?

Hi,
I was following this article:
https://manual.seafile.com/maintain/clean_database.html

But when I did type as the article did say it was a unknown database so I did type what I did remember that I did name the DB: seahub-db


MariaDB [(none)]> use seahub_db;
ERROR 1049 (42000): Unknown database 'seahub_db'

MariaDB [(none)]> use seahub-db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [seahub-db]> DELETE FROM Event WHERE to_days(now()) - to_days(timestamp) > 90;
ERROR 1146 (42S02): Table 'seahub-db.Event' doesn't exist

So I did not clean the DB and but it did say that the Database have changed, so my quastion is what have I done?
I have been googling but I can’t find what use seahub-db; does.

And how do I make this command work?

Edit:
Here is my DB’s that I have:


MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| ccnet-db           |
| information_schema |
| mysql              |
| performance_schema |
| seafile-db         |
| seahub-db          |
+--------------------+
6 rows in set (0.00 sec)

@DerDanilo @daniel.pan @shoeper

Edit:
Ok, so is the guide / manual out of date?
According to this I don’t have that table even:

MariaDB [seahub-db]> SHOW TABLES;
+-------------------------------------------+
| Tables_in_seahub-db                       |
+-------------------------------------------+
| admin_log_adminlog                        |
| api2_token                                |
| api2_tokenv2                              |
| avatar_avatar                             |
| avatar_groupavatar                        |
| base_clientlogintoken                     |
| base_commandslastcheck                    |
| base_devicetoken                          |
| base_filecomment                          |
| base_filediscuss                          |
| base_groupenabledmodule                   |
| base_innerpubmsg                          |
| base_innerpubmsgreply                     |
| base_userenabledmodule                    |
| base_userlastlogin                        |
| base_userstarredfiles                     |
| captcha_captchastore                      |
| constance_config                          |
| contacts_contact                          |
| django_content_type                       |
| django_migrations                         |
| django_session                            |
| group_groupmessage                        |
| group_messageattachment                   |
| group_messagereply                        |
| group_publicgroup                         |
| institutions_institution                  |
| institutions_institutionadmin             |
| institutions_institutionquota             |
| invitations_invitation                    |
| notifications_notification                |
| notifications_usernotification            |
| options_useroptions                       |
| organizations_orgmemberquota              |
| post_office_attachment                    |
| post_office_attachment_emails             |
| post_office_email                         |
| post_office_emailtemplate                 |
| post_office_log                           |
| profile_detailedprofile                   |
| profile_profile                           |
| registration_registrationprofile          |
| share_anonymousshare                      |
| share_fileshare                           |
| share_orgfileshare                        |
| share_privatefiledirshare                 |
| share_uploadlinkshare                     |
| sysadmin_extra_userloginlog               |
| termsandconditions_termsandconditions     |
| termsandconditions_usertermsandconditions |
| two_factor_phonedevice                    |
| two_factor_staticdevice                   |
| two_factor_statictoken                    |
| two_factor_totpdevice                     |
| wiki_groupwiki                            |
| wiki_personalwiki                         |
+-------------------------------------------+
56 rows in set (0.00 sec)

I believe because it has a dash in it SQL gets confused, try this

use `seahub-db;`
DELETE FROM Event WHERE to_days(now()) - to_days(timestamp) > 90;

i found this on the forum somewhere when i had trouble deleting tables, anytime there is a dash in the DB name a backtick is required.

I have a recent database, ill check to see if i have that table when i am home from work.

Thanks but it don’t help.


MariaDB [(none)]> use 'seahub-db';
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [seahub-db]> DELETE FROM Event WHERE to_days(now()) - to_days(timestamp) > 90;
ERROR 1146 (42S02): Table 'seahub-db.Event' doesn't exist
MariaDB [seahub-db]>

it should bee great if you can look if you have the Event table in your DB.

Edit:
Did try both:


MariaDB [(none)]> use `seahub-db`;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [seahub-db]> DELETE FROM Event WHERE to_days(now()) - to_days(timestamp) > 90;
ERROR 1146 (42S02): Table 'seahub-db.Event' doesn't exist
MariaDB [seahub-db]>

But nothing works, it seem that I don’t have the Event table but I have never change anything in the DB.
But still I’m wondering if something is tricky with my DB because of this?

I did go back and look at my install notes, I did write everything up and I did it exactly like the manual stated.
But I did install the DB’s by my self according to the manual, and as we can see the seahub-db do have tables but it just missing one table for some reason - or if the manual is outdated regarding the cleaning

My database has Event, :-\ looks like the backticks helped you select it but Event is definitely not listed in tables, need another users input.

The Event database table is only for pro edition.

Ok, thanks.
If you want you can note that in the manual :slight_smile:

Please send a pull request to the manual.

How do I do that?