class DistanceTable extends TripForeignKeyAbstractSqlTable<Distance> {

    @Override
    public synchronized void onCreate(@NonNull SQLiteDatabase db, @NonNull TableDefaultsCustomizer customizer) {
        super.onCreate(db, customizer);
        final String sql = "CREATE TABLE " + TABLE_NAME + " ("
                + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
                + COLUMN_PARENT_TRIP_ID + " INTEGER REFERENCES " + TripsTable.COLUMN_NAME + " ON DELETE CASCADE,"
                + COLUMN_DISTANCE + " DECIMAL(10, 2) DEFAULT 0.00,"
                + COLUMN_LOCATION + " TEXT,"
                + COLUMN_DATE + " DATE,"
                + COLUMN_TIMEZONE + " TEXT,"
                + COLUMN_COMMENT + " TEXT,"
                + COLUMN_RATE_CURRENCY + " TEXT NOT NULL, "
                + COLUMN_RATE + " DECIMAL(10, 2) DEFAULT 0.00, "
                + COLUMN_PAYMENT_METHOD_ID + " INTEGER REFERENCES " + PaymentMethodsTable.TABLE_NAME + " ON DELETE NO ACTION, "
                + COLUMN_LOCATION_HIDDEN_AUTO_COMPLETE + " BOOLEAN DEFAULT 0, "
                + COLUMN_COMMENT_HIDDEN_AUTO_COMPLETE + " BOOLEAN DEFAULT 0, "
                + AbstractSqlTable.COLUMN_DRIVE_SYNC_ID + " TEXT, "
                + AbstractSqlTable.COLUMN_DRIVE_IS_SYNCED + " BOOLEAN DEFAULT 0, "
                + AbstractSqlTable.COLUMN_DRIVE_MARKED_FOR_DELETION + " BOOLEAN DEFAULT 0, "
                + AbstractSqlTable.COLUMN_LAST_LOCAL_MODIFICATION_TIME + " DATE ,"
                + AbstractSqlTable.COLUMN_UUID + " TEXT "
                + ");";
        Logger.debug(this, sql);
        db.execSQL(sql);
    }

    public  DistanceTable(@NonNull SQLiteOpenHelper sqLiteOpenHelper, @NonNull Table<Trip> tripsTable,
                         @NonNull Table<PaymentMethod> paymentMethodTable, @NonNull UserPreferenceManager userPreferenceManager);

}