Hi,
Just use command: *select installed_rank from schema_version; *check which 
number is the highest and use one bigger in query.
For example: the biggest number on installed_rank is 32 so your query 
should looks like this:
 
INSERT INTO schema_version 
(installed_rank,version,description,type,script,checksum,installed_by,installed_on,execution_time,success)
 
values (*33*,'5.7.2017.04.11','DS-3563 Index metadatavalue resource type id 
column','SQL','V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql',-1,'dspace','2022-12-06
 
12:32:09.793369',0,true);

INSERT INTO schema_version 
(installed_rank,version,description,type,script,checksum,installed_by,installed_on,execution_time,success)
 
values (*34*,'5.7.2017.05.05','DS 3431 Add Policies for 
BasicWorkflow','JDBC','DS 3431 Add Policies for 
BasicWorkflow',-1,'dspace','2022-12-06 12:32:09.793369',0,true);

wtorek, 6 grudnia 2022 o 14:44:09 UTC+1 banjia...@gmail.com napisał(a):

> Hi Dominik, when i ran the query above I got this error
>
> ERROR:  duplicate key value violates unique constraint "schema_version_pk"
> DETAIL:  Key (installed_rank)=(27) already exists.
>
> ERROR:  duplicate key value violates unique constraint "schema_version_pk"
> DETAIL:  Key (installed_rank)=(29) already exists.
>
> Please am I missing something?
>
> On Tue, 6 Dec 2022 at 13:38, ZiGi <domi...@wp.pl> wrote:
>
>> Nevermind,
>> I *SOLVED* this problem by adding two rows to schema_version in dspace 
>> database:
>>
>> *INSERT INTO schema_version 
>> (installed_rank,version,description,type,script,checksum,installed_by,installed_on,execution_time,success)
>>  
>> values (27,'5.7.2017.04.11','DS-3563 Index metadatavalue resource type id 
>> column','SQL','V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql',-1,'dspace','2022-12-06
>>  
>> 12:32:09.793369',0,true);*
>>
>> *INSERT INTO schema_version 
>> (installed_rank,version,description,type,script,checksum,installed_by,installed_on,execution_time,success)
>>  
>> values (29,'5.7.2017.05.05','DS 3431 Add Policies for 
>> BasicWorkflow','JDBC','DS 3431 Add Policies for 
>> BasicWorkflow',-1,'dspace','2022-12-06 12:32:09.793369',0,true);*
>>
>> after that, run command  *./dspace database repair *and then  *./dspace 
>> database migrate ignored *. In my case everythig works now.
>> Dominik
>>
>> wtorek, 6 grudnia 2022 o 12:31:40 UTC+1 ZiGi napisał(a):
>>
>>> Dear Tim,
>>> Maybe you could send me the full query which I could use to insert 
>>> missing row? Becouse as I said I don't have  anything 
>>> like  "V5.7.2017.05.05" or 
>>> "V5_7_2017_05_05__DS_3431_Add_Policies_for_BasicWorkflow" on my 
>>> schema_version.
>>> Thanks,
>>> Dominik
>>> wtorek, 6 grudnia 2022 o 10:31:20 UTC+1 ZiGi napisał(a):
>>>
>>>> Hi,
>>>> I'm not sure you check the attachment in my first e-mail but I done 
>>>> everything one more time. So I don't have anything like  "V5.7.2017.05.05" 
>>>> or 
>>>> "V5_7_2017_05_05__DS_3431_Add_Policies_for_BasicWorkflow" on my 
>>>> schema_version, you can check that on screenshot in attachment but if I 
>>>> run 
>>>> ./dspace database info there 
>>>> is  "V5_7_2017_05_05__DS_3431_Add_Policies_for_BasicWorkflow" with status 
>>>> "Ignored". Any help will be  appreciated.
>>>>  Thanks,
>>>> Dominik
>>>>
>>>> poniedziałek, 5 grudnia 2022 o 16:44:15 UTC+1 Tim Donohue napisał(a):
>>>>
>>>>> Hi,
>>>>>
>>>>> This database migration error is one that some sites have encountered 
>>>>> after accidentally not running the "
>>>>> V5_7_2017_05_05__DS_3431_Add_Policies_for_BasicWorkflow" migration 
>>>>> during an older 5.x -> 6.x upgrade.   See this email thread: 
>>>>> https://groups.google.com/g/dspace-tech/c/F6ztOrBjXBA/m/fe3UP0_KAgAJ
>>>>>
>>>>> Luckily, this older migration is no longer valid.... so, if you 
>>>>> haven't run it already, it can now be skipped entirely (as it was only 
>>>>> necessary for DSpace 6.x and is not valid for DSpace 7.x)
>>>>>
>>>>> Unfortunately, at this time, skipping this script can only be done 
>>>>> directly in your database as follows:
>>>>>
>>>>>    1. In your database, you'll need to modify the Flyway 
>>>>>    "schema_version" table for that specific migration.
>>>>>    2. Look for the entry in that table for "V5.7.2017.05.05" (notice 
>>>>>    how this matches with the name of the migration script above) and set 
>>>>> its 
>>>>>    "success" column to "t" (true)
>>>>>    3. Run "./dspace database info" to verify that script is no longer 
>>>>>    showing a State of "Ignored" (it should now say either "Success" or 
>>>>> "Out of 
>>>>>    Order". Either status means it'll no longer be run.)
>>>>>    4. Try that "./dspace database migrate ignored" script again.  
>>>>>    Hopefully it'll work this time!
>>>>>
>>>>>
>>>>> Let us know if this works for you by responding on this mailing list.
>>>>>
>>>>> Tim
>>>>> ------------------------------
>>>>> *From:* dspac...@googlegroups.com <dspac...@googlegroups.com> on 
>>>>> behalf of ZiGi <domi...@wp.pl>
>>>>> *Sent:* Monday, December 5, 2022 2:58 AM
>>>>> *To:* DSpace Technical Support <dspac...@googlegroups.com>
>>>>> *Subject:* [dspace-tech] Database migrate from DSpace 6 to DSpace 7.4 
>>>>>  
>>>>> Dear all, 
>>>>> I have big problem with migrating database from DSpace 6 to Dspace 
>>>>> 7.4. When I try use command ./dspace migrate ignored I have very long 
>>>>> error 
>>>>> which you can see in the attachment. So after use command dspace database 
>>>>> info i got result which you find in attachment. After that I tried this 
>>>>> solution: 
>>>>> https://groups.google.com/g/dspace-tech/c/enhTBvnQm68/m/WnEgFm2-AwAJ 
>>>>> but in my schema_version I didn't have script named 
>>>>> V5.7_2017.04.11__DS-3563_Index_metadatavalue_resource_type_id_column.sql, 
>>>>> everyone else had status "t" so I did everything in this solution: 
>>>>> https://groups.google.com/g/dspace-tech/c/enhTBvnQm68/m/HM_kefBVDAAJ 
>>>>> but after use command dspace database migrate ingnored I still have error 
>>>>> telling about SQL errors. So far I tried also upgrade DSPace 6 to 7.4 
>>>>> with 
>>>>> the same result. I really don't know what else I can do.
>>>>> Thanks,
>>>>> Dominik 
>>>>> [image: dspace_database_info.jpg][image: psql_script_success.jpg]
>>>>>
>>>>> -- 
>>>>> All messages to this mailing list should adhere to the Code of 
>>>>> Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
>>>>> --- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "DSpace Technical Support" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to dspace-tech...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/dspace-tech/3e40c5ca-7b91-4f59-a79c-52f9a9f4de70n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/dspace-tech/3e40c5ca-7b91-4f59-a79c-52f9a9f4de70n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>> All messages to this mailing list should adhere to the Code of Conduct: 
>> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
>> --- 
>>
> You received this message because you are subscribed to a topic in the 
>> Google Groups "DSpace Technical Support" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dspace-tech/PlOA1WMvd4M/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> dspace-tech...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dspace-tech/cd0a353f-b463-4d58-8f71-375ba871a1cdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dspace-tech/cd0a353f-b463-4d58-8f71-375ba871a1cdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Adewoye Seun Oyebanji
> *RHCE | MCITP | R.ENG | MNSE*
> *banjia...@gmail.com, banjia...@live.com,*
> *+2347062930768 <+234%20706%20293%200768>*
>
> * I can do all things through Christ who strengthens me*
>
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/787709d7-b419-4c3b-95ea-a8455496a71en%40googlegroups.com.

Reply via email to