Skip to content
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

The "unique" column option is not supported #541

Closed
J0WI opened this issue Feb 23, 2021 · 45 comments
Closed

The "unique" column option is not supported #541

J0WI opened this issue Feb 23, 2021 · 45 comments
Labels

Comments

@J0WI
Copy link

J0WI commented Feb 23, 2021

Error: Doctrine\DBAL\Schema\Exception\UnknownColumnOption: The "unique" column option is not supported.

details ``` 0. /var/www/html/3rdparty/doctrine/dbal/src/Schema/Column.php line 84 Doctrine\DBAL\Schema\Exception\UnknownColumnOption::new("unique") 1. /var/www/html/3rdparty/doctrine/dbal/src/Schema/Column.php line 68 Doctrine\DBAL\Schema\Column->setOptions({notnull: true,length: 255,unique: true}) 2. /var/www/html/3rdparty/doctrine/dbal/src/Schema/Table.php line 355 Doctrine\DBAL\Schema\Column->__construct("adr", Doctrine\DBAL\Types\StringType {}, {notnull: true,length: 255,unique: true}) 3. /var/www/html/custom_apps/maps/lib/Migration/Version000009Date20190625000800.php line 43 Doctrine\DBAL\Schema\Table->addColumn("adr", "string", {notnull: true,length: 255,unique: true}) 4. /var/www/html/lib/private/DB/MigrationService.php line 455 OCA\Maps\Migration\Version000009Date20190625000800->changeSchema(OC\Migration\SimpleOutput {}, Closure {}, {tablePrefix: "oc_"}) 5. /var/www/html/lib/private/DB/MigrationService.php line 418 OC\DB\MigrationService->migrateSchemaOnly("latest") 6. /var/www/html/lib/private/Installer.php line 163 OC\DB\MigrationService->migrate("latest", true) 7. /var/www/html/apps/settings/lib/Controller/AppSettingsController.php line 448 OC\Installer->installApp("maps") 8. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 218 OCA\Settings\Controller\AppSettingsController->enableApps(["maps"], []) 9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 127 OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con ... {}, "enableApps") 10. /var/www/html/lib/private/AppFramework/App.php line 157 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "enableApps") 11. /var/www/html/lib/private/Route/Router.php line 302 OC\AppFramework\App::main("OCA\\Settings\\ ... r", "enableApps", OC\AppFramework\ ... {}, {_route: "settin ... "}) 12. /var/www/html/lib/base.php line 993 OC\Route\Router->match("/settings/apps/enable") 13. /var/www/html/index.php line 37 OC::handleRequest() ```
@J0WI J0WI added the bug label Feb 23, 2021
@gwenhael-le-moine
Copy link

I get the same error with MariaDB 10.5.9 with a fresh install. When trying to enable Maps it fails with this error message.

@arnakazim
Copy link

Just installed the latest version of Nextcloud (21.0.0) using SQLite and I get the same error when I try to enable the app.

@J0WI J0WI changed the title Postgres: The "unique" column option is not supported The "unique" column option is not supported Feb 23, 2021
@barti04
Copy link

barti04 commented Feb 24, 2021

Same. Nextcloud 21 and MariaDB.

@pxlkng
Copy link

pxlkng commented Feb 24, 2021

Same with Nextcloud 21.0.0.18 and MySQL 8

@bertieuk
Copy link

Just got this, editted /var/www/nextcloud/apps/maps/lib/Migration/Version000009Date20190625000800.php and removed the two lines (45 & 50) containing 'unique' => true,

Now works, gave an sql error when first enabled but seems to be working now it's analysing photos.

@pxlkng
Copy link

pxlkng commented Feb 24, 2021

Just got this, editted /var/www/nextcloud/apps/maps/lib/Migration/Version000009Date20190625000800.php and removed the two lines (45 & 50) containing 'unique' => true,

Now works, gave an sql error when first enabled but seems to be working now it's analysing photos.

Yeah this may be a hotfix but no long-term solution, I dont want to have to temper with the files. That should be getting fixed by nextcloud/contributors for this app.

@snevas
Copy link

snevas commented Mar 10, 2021

Here is the nextcloud server issue:
nextcloud/server#25607

It's broken for more apps.
I'm using docker fpm alpine image + sqlite db

@mchugh19
Copy link

On a pretty new install of nextcloud 21, I was able to edit the migration script as suggested to remove the unique elements. This allowed me to install maps. However, while I can now browse to the maps app, nothing loads, and the logs show:

Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_tracks' doesn't exist
Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_favorite_shares' doesn't exist
Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_favorites' doesn't exist

Is there a way to re-run the table creation scripts?

@Tyil
Copy link

Tyil commented Mar 11, 2021 via email

@hakunamatata97k
Copy link

nextcloud 21 with mariadb fresh install same error here!.

@localjo
Copy link

localjo commented Mar 15, 2021

I tried removing the unique lines, and now I'm getting another error:

An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'contact_uid' doesn't exist in table

@localjo
Copy link

localjo commented Mar 15, 2021

@Tyil I apologize if this is an obvious question, but I'm new to NextCloud and I don't have any context. Does this occ utility need to be run in a terminal via ssh? I'm not sure if my provider gives me ssh access.

@oucil
Copy link

oucil commented Mar 16, 2021

Nextcloud 21 with MySQL8, same problem.

@k6av
Copy link

k6av commented Mar 17, 2021

The same issue arises with Postgres on Nextcloud 21.

@tacruc
Copy link
Collaborator

tacruc commented Mar 19, 2021

Test of #568 are welcome.

@VoOoUoOoV
Copy link

VoOoUoOoV commented Mar 20, 2021

Just got this, editted /var/www/nextcloud/apps/maps/lib/Migration/Version000009Date20190625000800.php and removed the two lines (45 & 50) containing 'unique' => true,

Now works, gave an sql error when first enabled but seems to be working now it's analysing photos.

After del this line 45&50, i got another error.
Therefore i rewrote " 'unique' => true " back to the lines 45 & 50. Then no errors occours. Dont know why it works, but it does..

Update:
In App error occours. Cant find anything.. No Contacts, No GeoTagged Pictures, nothing..

Update 2:
Scan via "occ maps:scan-photos" and the other one, do not working. Getting exception errors:
""""""""""""""""""""""""""""""""""""""""""
In ExceptionConverter.php line 47:

An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_photos' doesn't exist

In Exception.php line 26:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_photos' doesn't exist

In Statement.php line 82:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_maps_photos' doesn't exist
""""""""""""""""""""""""""""""""""""""""""

@VoOoUoOoV
Copy link

Test of #568 are welcome.

Just testet it. Still not working.

@localjo
Copy link

localjo commented Mar 21, 2021

It looks like #568 fixes the problem. To get it to work, you need to disable the maps app, reset maps related database values, check out the fix branch, and then re-enable the maps app. Database commands are in #568 comments thread.

@VoOoUoOoV
Copy link

VoOoUoOoV commented Mar 22, 2021

Very Nice! oc_maps_* was missing like in #566
This is how it works @ my NC-DB
similar to #568

  1. Edit like described here
  2. Deactivate maps app in Nextcloud
  3. In DataBase goto oc_migrations delete/drop: app=maps
    grafik
  4. Enable maps app in Nextcloud

oc_maps_* should be available and maps app works after a few minutes (after auto scan via nextcloud)

Another Bug?
When you get the problem like loading screen for pictures ( #543 ), then you can fix it with edit this

@tacruc
Copy link
Collaborator

tacruc commented Mar 22, 2021

Another Bug?
After the contacts and pictures are shown in the maps, it is not possible to enlarge the pictures when choosing any.. Just seeing only the loading screen.

Probably you mean #543, or something else?

@VoOoUoOoV
Copy link

Another Bug?
After the contacts and pictures are shown in the maps, it is not possible to enlarge the pictures when choosing any.. Just seeing only the loading screen.

Probably you mean #543, or something else?

Yes, Thank you very Much! Now it works :)

@Joshua2504
Copy link

Same issue, latest nextcloud with mariadb.

@yuriry
Copy link

yuriry commented Mar 27, 2021

The same issue

Nextcloud 21.0.0
PostgreSQL 12

image

Update:
Just verified that the maps app installs/enables fine in Nextcloud 20.0.8

@VoOoUoOoV
Copy link

you can test the nightly or try this to fix it shortly. I used webmin to edit the DB

@ThatCoffeeGuy
Copy link

Same issue. Nextcloud 21.0.0 and Mysql 8

It might worth considering removing a completely broken app from featured.

Fortunately this worked:

1.) #541 (comment)
2.) disable maps
3.) mysql> DELETE FROM oc_migrations WHERE app LIKE "maps" ;
Query OK, 9 rows affected (0.01 sec)
4.) enable maps (ignore random syntax error..)
5.) $ sudo -u www-data php7.4 /var/www/nextcloud/occ maps:scan-photos

@gardinenstange
Copy link

Same issue. Nextcloud 21.0.0 and Mysql 8

It might worth considering removing a completely broken app from featured.

Fortunately this worked:

1.) #541 (comment)
2.) disable maps
3.) mysql> DELETE FROM oc_migrations WHERE app LIKE "maps" ;
Query OK, 9 rows affected (0.01 sec)
4.) enable maps (ignore random syntax error..)
5.) $ sudo -u www-data php7.4 /var/www/nextcloud/occ maps:scan-photos

didnt work :
An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'contact_uid' doesn't exist in table

@lupinehorror
Copy link

same error here with 21.0.1 on apache2 with mariadb v10.5.9 and php7.4

@Akruidenberg
Copy link

same here. Using 21.0.0.1 with mariadb 10.3

@snevas
Copy link

snevas commented Apr 26, 2021

As stated here, the nextcloud server will not support unique in the same way anymore. So the only hope is someone fixing it in the maps-app.

@srvoets
Copy link

srvoets commented Apr 29, 2021

Same issue, fresh nextcloud and mariadb install running in docker/unraid

@solmarcus
Copy link

Same issue. This app is one of the main reasons I use NC, but I can't install it. 😭

@Redsandro
Copy link

Redsandro commented May 4, 2021

Same issue, using PostgreSQL 12.2.

I'd like to point out that I just installed maps for the first time today, so it doesn't seem like the February patch fixed this for me. What exactly causes this to be an issue for me if I haven't used Maps before?

@debdolph
Copy link

debdolph commented May 4, 2021

Same issue on PostgreSQL 13…

@Redsandro
Copy link

I manually installed the 0.1.9 nightly and it works now. 👍

Manually installing apps is not ideal. We have the option to choose Nextcloud channels (stable, daily beta, production); we should similarly have the option to allow installing nighty (beta) app versions.

Please thumbs up the relevant issue: nextcloud/server#10487

@hobbsecky
Copy link

you can test the nightly or try this to fix it shortly. I used webmin to edit the DB

Worked for me too on a clean NextcloudVM running NC 21.0.1. Thanks!

@saschamander
Copy link

saschamander commented May 22, 2021

Just installed the nightly build of Nextcloud/Maps manually and it worked like a charm.
I used docker and tested it with a fresh installation of version 21.0.1 and 21.0.2(current latest). Both work with the nightly build.

My steps where

  1. Download nightly build of Nextcloud/Maps(link above)
  2. Extract nightly build archive
  3. Upload extracted maps-Folder to server into nextcloud/apps-Folder
  4. Update Owner/Group (with chown)
  5. Activate Maps via NC-WebInterface

EDIT:
If you want to have the stable version, you can disable and remove Maps again via the NC-WebInterface.
Also you will have to delete the maps folder from the nextcloud/apps-Folder.
After that you should be able to download and activate Maps in the current stable version.
(Though it seems I can't load my GPX-Tracks, but that is another issue)

@gianlucagiacometti
Copy link

Confirmed, thanks

@ma-gh
Copy link

ma-gh commented May 24, 2021

Very Nice! oc_maps_* was missing like in #566
This is how it works @ my NC-DB
similar to #568

  1. Edit like described here
  2. Deactivate maps app in Nextcloud
  3. In DataBase goto oc_migrations delete/drop: app=maps
    grafik
  4. Enable maps app in Nextcloud

oc_maps_* should be available and maps app works after a few minutes (after auto scan via nextcloud)

Another Bug?
When you get the problem like loading screen for pictures ( #543 ), then you can fix it with edit this

I did not have to drop anything from the Database, enabled via occ after editing files.
Thank you!

@rugk
Copy link

rugk commented May 30, 2021

With Nextcloud 21.0.2.1 and a fresh installation of Maps 0.1.8 (never installed/enabled before) this error also happens at installation time.
So I cannot "disable and re-enable it", as I cannot install it in the first place (via the web interface, at least).

Given that a fix has been integrated already if I read this issue correctly, what is stopping you from releasing the new version now?

@jjdsec
Copy link

jjdsec commented Jun 2, 2021

Just installed the nightly build of Nextcloud/Maps manually and it worked like a charm.
I used docker and tested it with a fresh installation of version 21.0.1 and 21.0.2(current latest). Both work with the nightly build.

My steps where

1. Download nightly build of Nextcloud/Maps(link above)

2. Extract nightly build archive

3. Upload extracted maps-Folder to server into nextcloud/apps-Folder

4. Update Owner/Group (with chown)

5. Activate Maps via NC-WebInterface

EDIT:
If you want to have the stable version, you can disable and remove Maps again via the NC-WebInterface.
Also you will have to delete the maps folder from the nextcloud/apps-Folder.
After that you should be able to download and activate Maps in the current stable version.
(Though it seems I can't load my GPX-Tracks, but that is another issue)

Confirmed as well, running NextCloud 21.0.2 with MariaDB 10.3.28 on CentOS 8 with php74-fpm
download, extract in apps folder (replacing existing maps folder) and enable in your applications in nextcloud

@snowphone
Copy link

I just started NextCloud a week ago, and found this issue recently.

Thus, do you guys know how long it takes to be stabilized? I'm planning to download 0.1.9 when it becomes stable, but I'm not sure how long should I wait for.

@alehaa
Copy link

alehaa commented Jun 6, 2021

I can confirm 0.1.9 works quite well, at least for those never have used it before. Just downloaded and copied it into the /apps subdirectory and works like a charm.

@tedmarcin
Copy link

same error here on postgresql 13

@AgentCasey
Copy link

I think that I may have a solution to this issue; cd to /var/www/nextcloud/apps/maps/lib/Migration and move all *.php files to somewhere for safekeeping. The directory should now be empty, then install the app again. It should install and act properly now. Thanks.

@tacruc
Copy link
Collaborator

tacruc commented Apr 14, 2022

I would summarize that #568 fixes this issue.
There might be a still be a problem with old tables, therefore I would like to point to #568 (comment).

@tacruc tacruc closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests