// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;


import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.location.Location;
import android.util.Log;
import java.text.ParseException;
                + KEY_LOCATION_LONGITUDE + " REAL,"                             // 4
                + KEY_LOCATION_ALTITUDE + " REAL,"                              // 5
                + KEY_LOCATION_SPEED + " REAL,"                                 // 6
                + KEY_LOCATION_ACCURACY + " REAL,"                              // 7
                + KEY_LOCATION_BEARING + " REAL,"                               // 8
                + KEY_LOCATION_TIME + " REAL,"                                  // 9
                + KEY_LOCATION_NUMBEROFSATELLITES + " INTEGER,"                 // 10
                + KEY_LOCATION_TYPE + " INTEGER,"                               // 11
                + KEY_LOCATION_NUMBEROFSATELLITESUSEDINFIX + " INTEGER" + ")";  // 12
        db.execSQL(CREATE_LOCATIONS_TABLE);

        String CREATE_PLACEMARKS_TABLE = "CREATE TABLE " + TABLE_PLACEMARKS + "("
                + KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"                // 0
                + KEY_TRACK_ID + " INTEGER,"                                    // 1
                + KEY_LOCATION_NUMBER + " INTEGER,"                             // 2
                + KEY_LOCATION_LATITUDE + " REAL,"                              // 3
                + KEY_LOCATION_LONGITUDE + " REAL,"                             // 4
                + KEY_LOCATION_ALTITUDE + " REAL,"                              // 5
                + KEY_LOCATION_SPEED + " REAL,"                                 // 6
                + KEY_LOCATION_ACCURACY + " REAL,"                              // 7
                + KEY_LOCATION_BEARING + " REAL,"                               // 8
                + KEY_LOCATION_TIME + " REAL,"                                  // 9
                + KEY_LOCATION_NUMBEROFSATELLITES + " INTEGER,"                 // 10
                + KEY_LOCATION_TYPE + " INTEGER,"                               // 11
                + KEY_LOCATION_NAME + " TEXT,"                                  // 12
                + KEY_LOCATION_NUMBEROFSATELLITESUSEDINFIX + " INTEGER" + ")";  // 13
        db.execSQL(CREATE_PLACEMARKS_TABLE);
    }

    private static final String DATABASE_ALTER_TABLE_LOCATIONS_TO_V2 = "ALTER TABLE "
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;


// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/DatabaseHandler.java
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.location.Location;
import android.util.Log;
import java.text.ParseException;

                + KEY_LOCATION_LONGITUDE + " REAL,"                             // 4
                + KEY_LOCATION_ALTITUDE + " REAL,"                              // 5
                + KEY_LOCATION_SPEED + " REAL,"                                 // 6
                + KEY_LOCATION_ACCURACY + " REAL,"                              // 7
                + KEY_LOCATION_BEARING + " REAL,"                               // 8
                + KEY_LOCATION_TIME + " REAL,"                                  // 9
                + KEY_LOCATION_NUMBEROFSATELLITES + " INTEGER,"                 // 10
                + KEY_LOCATION_TYPE + " INTEGER,"                               // 11
                + KEY_LOCATION_NUMBEROFSATELLITESUSEDINFIX + " INTEGER" + ")";  // 12
        db.execSQL(CREATE_LOCATIONS_TABLE);

        String CREATE_PLACEMARKS_TABLE = "CREATE TABLE " + TABLE_PLACEMARKS + "("
                + KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"                // 0
                + KEY_TRACK_ID + " INTEGER,"                                    // 1
                + KEY_LOCATION_NUMBER + " INTEGER,"                             // 2
                + KEY_LOCATION_LATITUDE + " REAL,"                              // 3
                + KEY_LOCATION_LONGITUDE + " REAL,"                             // 4
                + KEY_LOCATION_ALTITUDE + " REAL,"                              // 5
                + KEY_LOCATION_SPEED + " REAL,"                                 // 6
                + KEY_LOCATION_ACCURACY + " REAL,"                              // 7
                + KEY_LOCATION_BEARING + " REAL,"                               // 8
                + KEY_LOCATION_TIME + " REAL,"                                  // 9
                + KEY_LOCATION_NUMBEROFSATELLITES + " INTEGER,"                 // 10
                + KEY_LOCATION_TYPE + " INTEGER,"                               // 11
                + KEY_LOCATION_NAME + " TEXT,"                                  // 12
                + KEY_LOCATION_NUMBEROFSATELLITESUSEDINFIX + " INTEGER" + ")";  // 13
        db.execSQL(CREATE_PLACEMARKS_TABLE);
    }

    private static final String DATABASE_ALTER_TABLE_LOCATIONS_TO_V2 = "ALTER TABLE "
            + TABLE_LOCATIONS + " ADD COLUMN " + KEY_LOCATION_NUMBEROFSATELLITESUSEDINFIX + " INTEGER DEFAULT " +  NOT_AVAILABLE + ";";