mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Room - Added schema export directory
This commit is contained in:
parent
11c7d3fa73
commit
fc5876829c
3 changed files with 17 additions and 4 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue