mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 15:03:37 +00:00
Room - Added schema export directory
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.cappielloantonio.play.database;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.room.AutoMigration;
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
@@ -15,7 +17,12 @@ import com.cappielloantonio.play.model.Queue;
|
||||
import com.cappielloantonio.play.model.RecentSearch;
|
||||
import com.cappielloantonio.play.model.Server;
|
||||
|
||||
@Database(entities = {Queue.class, Server.class, RecentSearch.class, Download.class}, version = 23, exportSchema = false)
|
||||
@SuppressLint("RestrictedApi")
|
||||
@Database(
|
||||
version = 23,
|
||||
entities = {Queue.class, Server.class, RecentSearch.class, Download.class}
|
||||
// autoMigrations = { @AutoMigration(from = 23, to = 24) }
|
||||
)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
private static final String TAG = "AppDatabase";
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface DownloadDao {
|
||||
@Query("SELECT * FROM download WHERE server=:server AND artistId=:artistId")
|
||||
LiveData<List<Download>> getAllFromArtist(String server, String artistId);
|
||||
|
||||
@Query("SELECT * FROM download WHERE server=:server AND albumId=:albumId")
|
||||
@Query("SELECT * FROM download WHERE server=:server AND albumId=:albumId ORDER BY trackNumber ASC")
|
||||
LiveData<List<Download>> getAllFromAlbum(String server, String albumId);
|
||||
|
||||
@Query("SELECT * FROM download WHERE server=:server AND playlistId=:playlistId")
|
||||
|
||||
Reference in New Issue
Block a user