[db] Use default -1 for playlists.query_limit column
This commit is contained in:
parent
f167e975c2
commit
6ceede44f4
2
src/db.h
2
src/db.h
|
@ -248,7 +248,7 @@ struct playlist_info {
|
||||||
uint32_t parent_id; /* Id of parent playlist if the playlist is nested */
|
uint32_t parent_id; /* Id of parent playlist if the playlist is nested */
|
||||||
uint32_t directory_id; /* Id of directory */
|
uint32_t directory_id; /* Id of directory */
|
||||||
char *query_order; /* order by clause if it is a smart playlist */
|
char *query_order; /* order by clause if it is a smart playlist */
|
||||||
uint32_t query_limit; /* limit if it is a smart playlist */
|
int32_t query_limit; /* limit if it is a smart playlist */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define pli_offsetof(field) offsetof(struct playlist_info, field)
|
#define pli_offsetof(field) offsetof(struct playlist_info, field)
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
" parent_id INTEGER DEFAULT 0," \
|
" parent_id INTEGER DEFAULT 0," \
|
||||||
" directory_id INTEGER DEFAULT 0," \
|
" directory_id INTEGER DEFAULT 0," \
|
||||||
" query_order VARCHAR(1024)," \
|
" query_order VARCHAR(1024)," \
|
||||||
" query_limit INTEGER DEFAULT 0" \
|
" query_limit INTEGER DEFAULT -1" \
|
||||||
");"
|
");"
|
||||||
|
|
||||||
#define T_PLITEMS \
|
#define T_PLITEMS \
|
||||||
|
|
|
@ -1637,7 +1637,7 @@ static const struct db_upgrade_query db_upgrade_V1907_queries[] =
|
||||||
#define U_V1908_ALTER_PL_ADD_ORDER \
|
#define U_V1908_ALTER_PL_ADD_ORDER \
|
||||||
"ALTER TABLE playlists ADD COLUMN query_order VARCHAR(1024);"
|
"ALTER TABLE playlists ADD COLUMN query_order VARCHAR(1024);"
|
||||||
#define U_V1908_ALTER_PL_ADD_LIMIT \
|
#define U_V1908_ALTER_PL_ADD_LIMIT \
|
||||||
"ALTER TABLE playlists ADD COLUMN query_limit INTEGER DEFAULT 0;"
|
"ALTER TABLE playlists ADD COLUMN query_limit INTEGER DEFAULT -1;"
|
||||||
|
|
||||||
#define U_V1908_SCVER_MINOR \
|
#define U_V1908_SCVER_MINOR \
|
||||||
"UPDATE admin SET value = '08' WHERE key = 'schema_version_minor';"
|
"UPDATE admin SET value = '08' WHERE key = 'schema_version_minor';"
|
||||||
|
|
Loading…
Reference in New Issue