[ckan-dev] CKAN2.2 Upgrade Error

David Read david.read at hackneyworkshop.com
Fri Jan 3 18:08:53 UTC 2014


Georgios,

Yes, the docs are correct, you have to migrate ('paster db upgrade')
the database between all releases. There is a chance that there will
be no changes, in which case running the command does nothing.

Looking at the migrations for 2.1, it suggests you need to set the
version to 68. So try this variation:

1. Restore your backup of the CKAN 2.1 db.
2. Set the version in the db to 68.
3. Re-run the upgrade command.

If you still get errors, do do a pastebin again.

David



On 18 December 2013 14:54, Dimitrakakis Georgios <giorgis at ucnet.uoc.gr> wrote:
> So,
>
> if I understood correctly I have to run the upgrade database command every
> time I update CKAN?? Even if I am updating a minor revision??
>
> I tried both ways but unfortunately none of them worked!
>
> Any other ideas??
>
> Best,
>
> G.
>
>
>> That’s not good.
>>
>> I’ve never had this specific problem, so not sure of the best way to
>> proceed (apart from _doing a backup_).
>>
>> If it were me I’d try one of the following after backing up (and testing
>> the backup elsewhere) and not in production. I’d be less than confident of
>> either approach though.
>>
>> # Hacky solution 1.
>>
>> 1. Take a backup
>> 2. Set the value to 67 and re-run the upgrade command.
>> 3. You might then want to compare it to the schema on a fresh database.
>>
>> # Hacky (and even less likely to work) solution 2
>>
>> 1. Take a backup
>> 2. Run the upgrade command.
>> 3. If it fails with an already existing column, increment the number, go
>> to 2.
>>
>> In future, it’ll probably be safer to always run the migrations with the
>> upgrade command.
>>
>> Ross.
>>
>> On 18 Dec 2013, at 12:25, Dimitrakakis Georgios <giorgis at ucnet.uoc.gr>
>> wrote:
>>
>>> Mine seems to be in 1
>>>
>>> Here is the output:
>>>
>>> ckan_default=# select version from migrate_version;
>>> version
>>> ---------
>>>       1
>>> (1 row)
>>>
>>>
>>> G.
>>>
>>>
>>>> When you run the upgrade, it runs the migrations to update your database
>>>> but  I think that is from a really early migration and should have already
>>>> been run in the past.
>>>>
>>>> What do you get from the following query on your database?
>>>>
>>>> select version from migrate_version;
>>>>
>>>> On my older 2.something version this is 67.
>>>>
>>>> Ross.
>>>>
>>>> On 18 Dec 2013, at 12:06, Dimitrakakis Georgios <giorgis at ucnet.uoc.gr>
>>>> wrote:
>>>>
>>>>> No  because I was upgrading from v2.1 and since this is a minor release
>>>>> I thought it was not necessary.
>>>>>
>>>>> Therefore I did that now and here is the error:
>>>>>
>>>>> http://pastebin.com/b8EV99AF
>>>>>
>>>>>
>>>>> Any ideas about this?
>>>>>
>>>>> G.
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Did you run the ‘paster db upgrade’ at step 3 of
>>>>>> http://docs.ckan.org/en/latest/upgrade-package-to-minor-release.html ?
>>>>>>
>>>>>> Ross
>>>>>>
>>>>>> On 18 Dec 2013, at 11:38, Dimitrakakis Georgios <giorgis at ucnet.uoc.gr>
>>>>>> wrote:
>>>>>>
>>>>>>> I am trying to upgade to release-v2.2 from GIT but I am getting the
>>>>>>> error shown here: http://pastebin.com/3QgqFJHv
>>>>>>> when  I try to reindex the database!!!
>>>>>>>
>>>>>>> Any ideas much appreciated!!!
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> G.
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> ckan-dev mailing list
>>>>>>> ckan-dev at lists.okfn.org
>>>>>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>>>>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>> _______________________________________________
>>>>> ckan-dev mailing list
>>>>> ckan-dev at lists.okfn.org
>>>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>>>
>>>>
>>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev



More information about the ckan-dev mailing list