-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cospend update not working #328
Comments
Which database system are you using? Mysql/Mariadb, Postgres? It is supposed to be an unsigned int with NotNull set to false and a default value set to 0. If you're using Postgres, could you try to run this database query? On my side, no such thing has ever happened with MariaDB or Sqlite. |
Hi @julien-nc! ❯ sudo mycli
Connecting to socket /var/run/mysqld/mysqld.sock, owned by user mysql
MariaDB 10.11.6
mycli 1.26.1
Home: http://mycli.net
Bug tracker: https://github.com/dbcli/mycli/issues
Thanks to the contributor - QiaoHou Peng
MariaDB root@(none):(none)> use nextcloud
You are now connected to database "nextcloud" as user "root"
Time: 0.000s
MariaDB root@(none):nextcloud> show columns from oc_cospend_bills
+-------------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+---------------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | <null> | auto_increment |
| projectid | varchar(64) | NO | | <null> | |
| what | varchar(300) | NO | | <null> | |
| amount | double | NO | | <null> | |
| payerid | int(11) | NO | | <null> | |
| repeat | varchar(1) | NO | | n | |
| categoryid | int(11) | YES | | <null> | |
| paymentmode | varchar(1) | YES | | <null> | |
| lastchanged | bigint(20) unsigned | NO | | 0 | |
| repeatallactive | int(11) | NO | | 0 | |
| repeatuntil | varchar(20) | YES | | <null> | |
| timestamp | bigint(20) unsigned | NO | | 0 | |
| comment | varchar(300) | YES | | <null> | |
| repeatfreq | int(11) | NO | | 1 | |
| paymentmodeid | int(11) | NO | | 0 | |
| deleted | int(11) | NO | | 0 | |
| project_id | varchar(64) | YES | | <null> | |
| payer_id | bigint(20) unsigned | YES | | <null> | |
| category_id | bigint(20) | YES | | <null> | |
| payment_mode_id | bigint(20) unsigned | YES | | 0 | |
| payment_mode | varchar(1) | YES | | <null> | |
| last_changed | bigint(20) unsigned | NO | | 0 | |
| repeat_all_active | int(11) | NO | | 0 | |
| repeat_until | varchar(20) | YES | | <null> | |
| repeat_frequency | int(11) | NO | | 1 | |
+-------------------+---------------------+------+-----+---------+----------------+ Sorry for not giving details about the DB in the first place! |
Hi,
|
@julien-nc is there anything that I can test to try to investigate this pb? Do you have any suggestion on how we could rollback to the previous version (replacing the directory in |
@fauust The migration is trying to transfer the data from the So I guess you could check if there is a negative value in @prismplex About SELECT projectid from oc_cospend_bills GROUP BY projectid; Also, @prismplex On which migration step are you getting the warning? Look for something like |
Yep that was it, there was some negative value (-1) on old UPDATE oc_cospend_bills SET paymentmodeid = 0 WHERE paymentmodeid < 0; And then I could proceed to the upgrade, thanks a lot for this great app! |
After executing
I get: After executing
That is the error I get:
|
Hi, I am trying to update the cospend app to the latest version (3.0.8) and there seem to be a DB error, see below:
NC running in docker, version 30.0.4.
The text was updated successfully, but these errors were encountered: