mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 13:46:16 -08:00
feat: add EPG metadata fields to content schema and migration statements
This commit is contained in:
1 parent
04e8709d7b
commit
34098fd569
2 files changed
+13
No files matched your search
@@ -79,6 +79,10 @@ const CREATE_TABLE_STATEMENTS = [
|
||||
rating TEXT,
|
||||
added TEXT,
|
||||
poster_url TEXT,
|
||||
epg_channel_id TEXT,
|
||||
tv_archive INTEGER,
|
||||
tv_archive_duration INTEGER,
|
||||
direct_source TEXT,
|
||||
xtream_id INTEGER NOT NULL,
|
||||
type TEXT NOT NULL CHECK (type IN ('live', 'movie', 'series')),
|
||||
FOREIGN KEY (category_id) REFERENCES categories (id) ON DELETE CASCADE
|
||||
@@ -227,6 +231,11 @@ const COLUMN_MIGRATION_STATEMENTS = [
|
||||
`ALTER TABLE playlists ADD COLUMN payload TEXT`,
|
||||
// v1.2.0 -> v1.3.0: Add position column to favorites for global favorites ordering
|
||||
`ALTER TABLE favorites ADD COLUMN position INTEGER DEFAULT 0`,
|
||||
// v1.4.0 -> v1.5.0: Preserve Xtream live metadata required for EPG/catch-up
|
||||
`ALTER TABLE content ADD COLUMN epg_channel_id TEXT`,
|
||||
`ALTER TABLE content ADD COLUMN tv_archive INTEGER`,
|
||||
`ALTER TABLE content ADD COLUMN tv_archive_duration INTEGER`,
|
||||
`ALTER TABLE content ADD COLUMN direct_source TEXT`,
|
||||
];
|
||||
|
||||
const INDEX_MIGRATION_STATEMENTS = [
|
||||
|
||||
@@ -87,6 +87,10 @@ export const content = sqliteTable(
|
||||
rating: text('rating'),
|
||||
added: text('added'),
|
||||
posterUrl: text('poster_url'),
|
||||
epgChannelId: text('epg_channel_id'),
|
||||
tvArchive: integer('tv_archive'),
|
||||
tvArchiveDuration: integer('tv_archive_duration'),
|
||||
directSource: text('direct_source'),
|
||||
xtreamId: integer('xtream_id').notNull(),
|
||||
type: text('type', { enum: ['live', 'movie', 'series'] }).notNull(),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user