Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SQL/SQLite/schema_clear.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DELETE FROM genre_track;
DELETE FROM comments;

DELETE FROM scanned_files;
DELETE FROM scanned_pics;

DELETE FROM works;

Expand Down
2 changes: 2 additions & 0 deletions SQL/SQLite/schema_optimize.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
-- This is done here as it is faster to do in sql than in the server.
--

DELETE FROM scanned_pics;

Comment thread
michaelherger marked this conversation as resolved.
-- XXX This appears to not be needed anymore as contributors are properly
-- removed by the new scanner

Expand Down
15 changes: 15 additions & 0 deletions SQL/SQLite/schema_scanner.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DROP TABLE IF EXISTS scanned_files;
CREATE TABLE scanned_files (
url text NOT NULL,
timestamp int(10),
filesize int(10)
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't suggesting removing the nocase from scanned_files. Does #705 no longer apply?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh... what were you suggesting then?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove it from scanned_pics.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Got it. Thanks for the clarification.

CREATE INDEX scannedUrlIndex ON scanned_files (url);

DROP TABLE IF EXISTS scanned_pics;
CREATE TABLE scanned_pics (
url text NOT NULL,
timestamp int(10),
filesize int(10)
);
CREATE INDEX scannedPicUrlIndex ON scanned_pics (url);
1 change: 1 addition & 0 deletions SQL/mysql/schema_clear.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ DELETE FROM pluginversion;
DELETE FROM unreadable_tracks;

DELETE FROM scanned_files;
DELETE FROM scanned_pics;

DELETE FROM works;

Expand Down
2 changes: 2 additions & 0 deletions SQL/mysql/schema_optimize.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
-- This is done here as it is faster to do in sql than in the server.
--

DELETE FROM scanned_pics;

-- XXX This appears to not be needed anymore as contributors are properly
-- removed by the new scanner

Expand Down
15 changes: 15 additions & 0 deletions SQL/mysql/schema_scanner.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DROP TABLE IF EXISTS scanned_files;
CREATE TABLE scanned_files (
url text NOT NULL COLLATE NOCASE, -- URL must be case insensitive, or we might duplicate tracks if the filename changes case only (https://github.com/LMS-Community/slimserver/issues/705#issuecomment-1026229542)
timestamp int(10),
filesize int(10)
);
CREATE INDEX scannedUrlIndex ON scanned_files (url);

DROP TABLE IF EXISTS scanned_pics;
CREATE TABLE scanned_pics (
url text NOT NULL COLLATE NOCASE, -- URL must be case insensitive, or we might duplicate tracks if the filename changes case only (https://github.com/LMS-Community/slimserver/issues/705#issuecomment-1026229542)
timestamp int(10),
filesize int(10)
);
CREATE INDEX scannedPicUrlIndex ON scanned_pics (url);
Loading
Loading