brantje / nextnote

A full Evernote / OneNote style WYSIWYG note editor for Nextcloud / ownCloud. Join our telegram at: https://t.me/NextNote
GNU Affero General Public License v3.0
163 stars 19 forks source link

Cannot install....exception occurred #34

Closed Japhys closed 6 years ago

Japhys commented 7 years ago

I disabled and deleted ownnote and installed nextnote. I get this message. Any ideas?

An exception occurred while executing 'CREATE TABLE oc_ownnote (id BIGINT AUTO_INCREMENT NOT NULL, uid VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, grouping VARCHAR(255) NOT NULL, shared LONGTEXT NOT NULL, mtime BIGINT NOT NULL, deleted SMALLINT DEFAULT 0 NOT NULL, note LONGTEXT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_ownnote' already exists

ThomasDaheim commented 7 years ago

@brantje We should add that to the readme...

We're currently using the same tables as ownnote - at least for now. Uninstall ownnote doesn't remove the database tables :-( Worked for my and others after this error simply by logging out and back in again + enabling next note.

Japhys commented 7 years ago

Unfortunately it doesn't work for me

ThomasDaheim commented 7 years ago

Strange... A more brute force would be

@steve-s-71 Tried again on a different NC installation and strictly kep following order: 1. deactivate ownnote, uninstall ownnote, uploaded nextnote, try to activate nextnote. After I got the exists error: logout & login again. Unfortunately the app is still inactive. @steve-s-71 got it activated after dropping all ownnote tables @steve-s-71 ...and I got all ownnote data back under nextnote by restoring the ownnote tables via ownbackup :grinning:

ThomasDaheim commented 7 years ago

But thats only something you should do with a backup of the database

Japhys commented 7 years ago

Thanks I thought about trying that. Will do later today! Thanks

mehturt commented 7 years ago

I migrated from OC 9.1 right now and I got this same exception about table already exists, logout and login fixed it for me and now I see the notes. Looking forward to the android app :)

mehturt commented 6 years ago

I upgraded from NC 11 to NC 12 right now and I see this exception again when trying to enable the app. Unfortunately the logout login does not help this time. It's strange to me why it tries to create the DB table again, when it must have existed before together with the notes (data) in it?

mattenklicker commented 6 years ago

Try this:

  1. Backup DB
  2. Rename the two ownnote tables
  3. Install nextnode
  4. Delete the new created tables and rename the old tables back again.
ThomasDaheim commented 6 years ago

Seems to work here as well. But we would need to find a way to fix this. Will have a look if I an see where this pops up during enable...

mehturt commented 6 years ago

@mattenklicker thanks, those steps worked for me

ThomasDaheim commented 6 years ago

@brantje : Could https://docs.nextcloud.com/server/12/developer_manual/app/repair.html be of help here? Something to run pre-install and to check if db creation is really necessary?

mulander commented 6 years ago

I just hit this issue again. Upgraded from OpenBSD 6.1 using nextcloud (11.02) to OpenBSD 6.2 using nextcloud (12.02).

The nextnote plugin got disabled on upgrade automatically and I was not able to enable it again. I manually renamed the tables in postgres, allowed nextcloud to automatically create tables when enabling the plugin. Then dropped the tables and replaced them with the backed up original ones.

What's significant here is, this was an upgrade from nextcloud to nextcloud both already using 'nextnote'.

lwinch2006 commented 6 years ago

For me it worked to rename all ownnote to nextnote in database.xml. One important thing missing in my opinion is to save notes as files. Without this they cannot be sync-ed to mobile device and viewed there.