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

Unknown column 'calendartype' (table calendarobjects) #12410

Closed
ChristophWurst opened this issue Nov 12, 2018 · 10 comments
Closed

Unknown column 'calendartype' (table calendarobjects) #12410

ChristophWurst opened this issue Nov 12, 2018 · 10 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug feature: dav regression
Milestone

Comments

@ChristophWurst
Copy link
Member

ChristophWurst commented Nov 12, 2018

As discovered when testing nextcloud/contacts#706, it's not possible to create a contact on latest master. Apparently this is a regression of #10059.

Raw DAV response (HTTP500)

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Doctrine\DBAL\Exception\InvalidFieldNameException</s:exception>
  <s:message>An exception occurred while executing 'SELECT `id`, `uri`, `lastmodified`, `etag`, `calendarid`, `size`, `calendardata`, `componenttype`, `classification` FROM `oc_calendarobjects` WHERE (`calendarid` = ?) AND (`uri` = ?) AND (`calendartype` = ?)' with params ["18", "contacts-5942F193-088E-41FE-AABD-8044A15194E1.vcf.ics", 0]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'calendartype' in 'where clause'</s:message>
</d:error>

This column was added in #10593, but the migration was never run:

> select * from oc_migrations where app = 'dav' and version = '1006Date20180628111625';
Empty set (0.00 sec)

cc @georgehrke @nickvergessen

@georgehrke
Copy link
Member

Very simple guess: it didn't run because #10059 didn't increase the app version?

I guess the app-version change went missing on a rebase.

@ChristophWurst
Copy link
Member Author

Likely: a6c8fe0 @skjnldsv 👀

@nextcloud-bot

This comment has been minimized.

@nickvergessen
Copy link
Member

Well the other reason is that the migration was not the newest.
So when you had already the 1007 or the 1008 migration executed, the 1006 is skipped I think.

@georgehrke
Copy link
Member

@nickvergessen It just checks what migrations have been run and which not: https://github.com/nextcloud/server/blob/master/lib/private/DB/MigrationService.php#L258

@georgehrke
Copy link
Member

@ChristophWurst Did you check if simply increasing the app-version helps?

I don't get this regression on a fresh installation.

@ChristophWurst
Copy link
Member Author

Yep, according to the migrations table the migration was run

@georgehrke
Copy link
Member

But you said in the original report that the migration was not run:

but the migration was never run:

?

@ChristophWurst
Copy link
Member Author

*after increasing the app version, ofc ;)

@nickvergessen
Copy link
Member

#12447 increases the app version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: dav regression
Projects
None yet
Development

No branches or pull requests

5 participants