CREATE TABLE users ( id MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY auto_increment, login VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL ) CREATE TABLE categories ( id MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY auto_increment, owner_id MEDIUMINT UNSIGNED NOT NULL, name VARCHAR(255) NOT NULL, position SMALLINT UNSIGNED NOT NULL ); CREATE TABLE feeds ( id INT UNSIGNED NOT NULL PRIMARY KEY auto_increment, owner_id MEDIUMINT UNSIGNED NOT NULL, category_id MEDIUMINT UNSIGNED NOT NULL, title VARCHAR(255) NOT NULL, desc VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, site_title VARCHAR(255) NOT NULL, site_url VARCHAR(255) NOT NULL, private TINYINT NOT NULL DEFAULT 0, disabled TINYINT NOT NULL DEFAULT 0, update_interval INT UNSIGNED NOT NULL, added DATETIME NOT NULL, last_update DATETIME NULL, extra_data TEXT NOT NULL, nb_items MEDIUMINT UNSIGNED NOT NULL DEFAULT 0 ); CREATE TABLE update_log ( feed_id INT UNSIGNED NOT NULL, `date` DATETIME NOT NULL, message TEXT ); CREATE TABLE items_0 ( id INT UNSIGNED NOT NULL PRIMARY KEY auto_increment, feed_id INT UNSIGNED NOT NULL, title VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, added DATETIME NOT NULL, pubdate DATETIME NOT NULL, updated DATETIME NULL, content TEXT NOT NULL, extra_data TEXT NOT NULL, content_hash VARCHAR(255) NOT NULL ); CREATE TABLE unread_items ( owner_id MEDIUMINT UNSIGNED NOT NULL, feed_id INT UNSIGNED NOT NULL, item_id INT UNSIGNED NOT NULL, `date` DATETIME NOT NULL ); CREATE TABLE plugins ( owner_id MEDIUMINT UNSIGNED NOT NULL, plugin VARCHAR(255) NOT NULL, extra_params TEXT NOT NULL );