Thanks all, slowly I am getting Koha 3 to work. I have the patrons loaded and the biblios in. Of course I got stuck somewhere else, nothing is ever easy around here... So how do I get the issues loaded? At the moment nobody has anything out, which is not actually the case. I tried this: debian:~# mysqldump Koha.issues > Koha_issues09.sql mysqldump: Got error: 1102: Incorrect database name 'Koha.issues' when selecting the database Then I tried this: mysql> SELECT borrowernumber,itemnumber,date_due,branchcode,issuingbranch,returndate,lastreneweddate,return,renewals,timestamp INTO OUTFILE 'issues.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' FROM issues; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'return,renewals,timestamp INTO OUTFILE 'issues.csv' FIELDS TERMINATED BY ',' EN' at line 1 However, it works when I remove the return table; mysql> SELECT borrowernumber,itemnumber,date_due,branchcode,issuingbranch,returndate,lastreneweddate,renewals,timestamp INTO OUTFILE 'issues.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' FROM issues; Query OK, 6163 rows affected (0.16 sec) Importing this does NOT work; mysql> use koha; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> LOAD DATA INFILE "/home/marty/issues.csv" INTO TABLE issues FIELDS TERMINATED BY ',' ENCLOSED BY ""; ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`koha/issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL) I also modified the table to match the issues table in Koha 3 by adding the issuedate but that doesn't seem to help either. So I am stuck again... Any help is appreciated, as I am more a librarian than a database expert... Thanks again, Marty
On 2009/02/1, at 5:25 AM, Marty wrote:
Thanks all, slowly I am getting Koha 3 to work. I have the patrons loaded and the biblios in. Of course I got stuck somewhere else, nothing is ever easy around here... So how do I get the issues loaded? At the moment nobody has anything out, which is not actually the case.
i think you are getting a bit off track here Marty. the problem you are having is related (?i assume?) to the difference in table structure between your 2.2 and 3.0 issues tables. the update22to3.pl script handles this problem for you. i have done a 2.2 to 3.0 upgrade very recently, and the the steps described in this wiki page should do the trick. http://wiki.koha.org/doku.php?id=22_to_30&s=update22to30 fyi: the script update22to30.pl upgrades your existing 2.2 db structure to a shiny new 3.0 db (and all the data in it too, including the issues table) so, following the wiki steps - you shouldnt need to manually load in your issues data at all, as its already sitting there in your successfully upgraded db, with your other data. cheers, Mason.
participants (2)
-
Marty -
Mason James