Removed Messages -> Feeds foreign key.

This commit is contained in:
Martin Rotter 2015-12-03 14:09:02 +01:00
parent 10f1841b54
commit 3fe08fa67d
4 changed files with 4 additions and 3 deletions

View File

@ -85,6 +85,5 @@ CREATE TABLE IF NOT EXISTS Messages (
account_id INTEGER NOT NULL,
custom_id TEXT,
FOREIGN KEY (feed) REFERENCES Feeds (id),
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);

View File

@ -80,6 +80,5 @@ CREATE TABLE IF NOT EXISTS Messages (
account_id INTEGER NOT NULL,
custom_id TEXT,
FOREIGN KEY (feed) REFERENCES Feeds (id),
FOREIGN KEY (account_id) REFERENCES Accounts (id)
);

View File

@ -34,4 +34,7 @@ ADD COLUMN custom_id TEXT;
ALTER TABLE Categories
ADD COLUMN custom_id TEXT;
-- !
ALTER TABLE Messages
DROP FOREIGN KEY feed;
-- !
UPDATE Information SET inf_value = '4' WHERE inf_key = 'schema_version';

View File

@ -50,7 +50,7 @@ class Message {
QString m_contents;
QDateTime m_created;
int m_feedId;
QString m_customId;
QList<Enclosure> m_enclosures;