-- LOAD DATA INFILE './data/PaleocurrentDatabase.csv'
--     INTO TABLE paleocurrent
--     FIELDS TERMINATED BY ','
--     ENCLOSED BY '"'
--     LINES TERMINATED BY '\n'
--     IGNORE 1 ROWS;

-- Fields:
-- 'id',
-- 'continental_area',
-- 'stratigraphic_level',
-- 'record_number',
-- 'publication_authors',
-- 'publication_title',
-- 'publication_date',
-- 'publication_journal',
-- 'publication_volume',
-- 'start_page',
-- 'end_page',
-- 'total_records',
-- 'period',
-- 'longitude',
-- 'latitude',
-- 'direction',
-- 'total_measurements',
-- 'area_sq_km',
-- 'dispersion',
-- 'tectonic_plate_id',
-- 'deposition_environment_id',
-- 'paleocurrent_type_id',
-- 'lithology_id',
-- 'formation'

SET foreign_key_checks = 0;

-- id,continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation

LOAD DATA INFILE './data/PaleocurrentDatabase-Adriatic.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-African.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Antarctic.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Baltic.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-China.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-European.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-GreatBritain.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Greenland.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Iberian.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Indian.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-IndoAustralian.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Iranian.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Kazakhstan.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Main.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-NorthAmerica.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-Siberian.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);
LOAD DATA INFILE './data/PaleocurrentDatabase-SouthAmerica.csv' INTO TABLE paleocurrent FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS  (continental_area,stratigraphic_level,record_number,publication_authors,publication_title,publication_date,publication_journal,publication_volume,start_page,end_page,total_records,period,longitude,latitude,direction,total_measurements,area_sq_km,dispersion,tectonic_plate_id,deposition_environment_id,paleocurrent_type_id,lithology_id,formation);

SET foreign_key_checks = 1;