rssguard/resources/misc/db_update_mysql_3_4.sql

67 lines
1.5 KiB
MySQL
Raw Normal View History

CREATE TABLE Accounts (
id INTEGER PRIMARY KEY,
type TEXT NOT NULL
);
-- !
INSERT INTO Accounts (type) VALUES ('std-rss');
2015-11-29 14:35:10 +01:00
-- !
DROP TABLE IF EXISTS FeedsData;
-- !
CREATE TABLE TtRssAccounts (
2015-12-07 09:42:46 +01:00
id INTEGER,
username TEXT NOT NULL,
password TEXT,
2015-12-15 07:43:41 +01:00
auth_protected INTEGER(1) NOT NULL CHECK (auth_protected >= 0 AND auth_protected <= 1) DEFAULT 0,
auth_username TEXT,
auth_password TEXT,
url TEXT NOT NULL,
FOREIGN KEY (id) REFERENCES Accounts (id)
);
-- !
ALTER TABLE Messages
ADD COLUMN account_id INTEGER NOT NULL DEFAULT (1);
-- !
ALTER TABLE Messages
ADD COLUMN custom_id TEXT;
-- !
2015-12-03 14:09:02 +01:00
ALTER TABLE Messages
DROP FOREIGN KEY feed;
-- !
ALTER TABLE Messages
2015-12-11 13:56:05 +01:00
MODIFY feed TEXT NOT NULL;
-- !
2015-12-14 07:22:34 +01:00
ALTER TABLE Messages
MODIFY author TEXT;
-- !
ALTER TABLE Messages
MODIFY url TEXT;
-- !
ALTER TABLE Feeds
ADD COLUMN account_id INTEGER NOT NULL DEFAULT (1);
-- !
ALTER TABLE Feeds
ADD COLUMN custom_id TEXT;
-- !
ALTER TABLE Feeds
MODIFY date_created BIGINT;
-- !
ALTER TABLE Feeds
MODIFY encoding TEXT;
-- !
ALTER TABLE Feeds
MODIFY url VARCHAR(100);
-- !
ALTER TABLE Feeds
MODIFY type INTEGER;
-- !
ALTER TABLE Categories
2015-12-14 07:22:34 +01:00
ADD COLUMN account_id INTEGER NOT NULL DEFAULT (1);
-- !
2015-12-14 07:22:34 +01:00
ALTER TABLE Categories
ADD COLUMN custom_id TEXT;
2015-12-11 13:56:05 +01:00
-- !
2015-12-14 07:22:34 +01:00
ALTER TABLE Categories
MODIFY date_created BIGINT;
-- !
2015-11-29 14:35:10 +01:00
UPDATE Information SET inf_value = '4' WHERE inf_key = 'schema_version';