title: Avoid creation of _id column in sqlite
body: <p>I'm using android.persistence.room to create a database. I have an intermediate table in which rows are identified with the PK's of two other tables, so there's no need for an id column (i'm not using a cursor). There is no id field in my class, room doesn't complain about it. And i've added a migration in which i create a new table without id column; copy existing data and renaming it (the typical drop column approach in sqlite), still the id column is there.</p>
  
  <pre><code>@Entity(tableName = "recipe_ingredients",
          foreignKeys = {
              @ForeignKey(entity =
                      Recipe.class,
                      parentColumns = "id",
                      childColumns = "recipe",
                      onDelete = ForeignKey.CASCADE),
              @ForeignKey(entity =
                      Ingredient.class,
                      parentColumns = "id",
                      childColumns = "ingredient",
                      onDelete = ForeignKey.RESTRICT)
          },
          primaryKeys = {"recipe", "ingredient"})
  public class RecipeIngredient {
  
  //region members
      @ColumnInfo(name = "recipe")
  private int mReceptId;
      @ColumnInfo(name = "ingredient")
  private int mIngredientId;
      @Embedded
  private Ingredient mIngredient;
      @ColumnInfo(name = "amount")
  private double amount;
      @Ignore
  private int mNumberOfRecipeIdChanges;
      @Ignore
  private int mNumberOfIngredientIdChanges;
  //endregion
  </code></pre>
  
  <p>and my migration</p>
  
  <pre><code>static final Migration MIGRATION_1_2 = new Migration(1, 2) {
      @Override
      public void migrate(@NonNull SupportSQLiteDatabase database) {
          // Create the new table
          database.execSQL("CREATE TABLE recipe_ingredients_new " +
                  "(recipe INTEGER NOT NULL, ingredient INTEGER NOT NULL," + 
                  "  amount REAL NOT NULL," +
                  " PRIMARY KEY(recipe, ingredient), " +
                  "FOREIGN KEY(recipe) REFERENCES recipes(id)" +
                  " ON UPDATE NO ACTION ON DELETE CASCADE ," +
                  " FOREIGN KEY(ingredient) REFERENCES ingredients(id) " +
                  "ON UPDATE NO ACTION ON DELETE RESTRICT )" );
          // Copy the data
          database.execSQL(
                  "INSERT INTO recipe_ingredientes_new (recipe, "+ 
                   " ingredient, amount)" +
                          " SELECT  recipe, ingredient, amount FROM 
  recipe_ingredients");
          // Remove the old table
          database.execSQL("DROP TABLE recipe_ingredients");
          // Change the table name to the correct one
          database.execSQL("ALTER TABLE recipe_ingredients_new RENAME TO 
   recipe_ingredients");
  
      }
  };
  </code></pre>