![]() Just watch the output (if there is any) and use your brain to determine whether it's a problem or not. I had some rows which failed to load because the dates were invalid (apparently they had GPS around the time of christ) but that was OK because they were event rows and I didn't want that bad data anyway. Finally it connects to the database and runs the SQL.It switches from using INSERT commands to REPLACE commands, so we overwrite the few rows which already exist in the DB, like the default admin user.It lowercases the table and row names (MySQL uses lowercase, H2 uses uppercase).It removes the DATABASECHANGELOG tables from the input, we don't need those.It temporarily disables foreign key checks on the database so that we can dump rows in out of order. ![]() So put the script in a file, mark it executable and run it with the output file from RazorSQL as the first argument and the MySQL database name as the second argument. Sed -i -e 's/INSERT INTO \(.*\) VALUES/INSERT INTO \L\1 \UVALUES/' $F.2
0 Comments
Leave a Reply. |