Skip to content

Commit

Permalink
remove useless table
Browse files Browse the repository at this point in the history
  • Loading branch information
birabittoh committed Jan 15, 2024
1 parent 5dacd81 commit ca53f1b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions invidious/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ func InitDB() {
logger.Errorf("%q: %s\n", err, createQueryVideos)
return
}
_, err = db.Exec(createQueryFormats)
if err != nil {
logger.Errorf("%q: %s\n", err, createQueryFormats)
return
}
}

func CacheVideoDB(v Video) error {
Expand Down
11 changes: 0 additions & 11 deletions invidious/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@ CREATE TABLE IF NOT EXISTS videos (
expire DATETIME NOT NULL
);`

const createQueryFormats = `
CREATE TABLE IF NOT EXISTS formats (
videoId TEXT,
name TEXT,
height TEXT NOT NULL,
width TEXT NOT NULL,
url TEXT,
PRIMARY KEY (videoId, name),
FOREIGN KEY(videoId) REFERENCES videos(videoId)
);`

const getVideoQuery = "SELECT * FROM videos WHERE videoId = (?);"

const cacheVideoQuery = "INSERT OR REPLACE INTO videos (videoId, title, description, uploader, duration, url, expire) VALUES (?, ?, ?, ?, ?, ?, ?);"
Expand Down

0 comments on commit ca53f1b

Please sign in to comment.