diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 70 | ||||
-rw-r--r-- | install/schema_postgres.sql | 69 | ||||
-rw-r--r-- | install/update.php | 17 |
3 files changed, 16 insertions, 140 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index 68b739f7a..63be37f80 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -434,62 +434,6 @@ CREATE TABLE IF NOT EXISTS `event` ( KEY `event_priority` (`event_priority`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `fcontact` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `url` char(255) NOT NULL, - `name` char(255) NOT NULL, - `photo` char(255) NOT NULL, - `request` char(255) NOT NULL, - `nick` char(255) NOT NULL, - `addr` char(255) NOT NULL, - `batch` char(255) NOT NULL, - `notify` char(255) NOT NULL, - `poll` char(255) NOT NULL, - `confirm` char(255) NOT NULL, - `priority` tinyint(1) NOT NULL, - `network` char(32) NOT NULL, - `alias` char(255) NOT NULL, - `pubkey` text NOT NULL, - `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - KEY `addr` (`addr`), - KEY `network` (`network`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `ffinder` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `uid` int(10) unsigned NOT NULL, - `cid` int(10) unsigned NOT NULL, - `fid` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `cid` (`cid`), - KEY `fid` (`fid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `fserver` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `server` char(255) NOT NULL DEFAULT '', - `posturl` char(255) NOT NULL DEFAULT '', - `key` text NOT NULL, - PRIMARY KEY (`id`), - KEY `server` (`server`), - KEY `posturl` (`posturl`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `fsuggest` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NOT NULL DEFAULT '0', - `cid` int(11) NOT NULL DEFAULT '0', - `name` char(255) NOT NULL DEFAULT '', - `url` char(255) NOT NULL DEFAULT '', - `request` char(255) NOT NULL DEFAULT '', - `photo` char(255) NOT NULL DEFAULT '', - `note` text NOT NULL, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `groups` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `hash` char(255) NOT NULL DEFAULT '', @@ -1194,20 +1138,6 @@ CREATE TABLE IF NOT EXISTS `source` ( KEY `src_xchan` (`src_xchan`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `spam` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `uid` int(11) NOT NULL DEFAULT '0', - `spam` int(11) NOT NULL DEFAULT '0', - `ham` int(11) NOT NULL DEFAULT '0', - `term` char(255) NOT NULL DEFAULT '', - `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `spam` (`spam`), - KEY `ham` (`ham`), - KEY `term` (`term`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `sys_perms` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `cat` char(255) NOT NULL DEFAULT '', diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 76a3a013e..1ae65068c 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -428,62 +428,6 @@ create index "event_status_idx" on event ("event_status"); create index "event_sequence_idx" on event ("event_sequence"); create index "event_priority_idx" on event ("event_priority"); - -CREATE TABLE "fcontact" ( - "id" serial NOT NULL, - "url" text NOT NULL, - "name" text NOT NULL, - "photo" text NOT NULL, - "request" text NOT NULL, - "nick" text NOT NULL, - "addr" text NOT NULL, - "batch" text NOT NULL, - "notify" text NOT NULL, - "poll" text NOT NULL, - "confirm" text NOT NULL, - "priority" numeric(1) NOT NULL, - "network" varchar(32) NOT NULL DEFAULT '', - "alias" text NOT NULL, - "pubkey" text NOT NULL, - "updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', - PRIMARY KEY ("id") -); -create index "fcontact_addr_idx" on fcontact ("addr"); -create index "fcontact_network_idx" on fcontact ("network"); - -CREATE TABLE "ffinder" ( - "id" serial NOT NULL, - "uid" bigint NOT NULL, - "cid" bigint NOT NULL, - "fid" bigint NOT NULL, - PRIMARY KEY ("id") -); -create index "ffinder_uid_idx" on ffinder ("uid"); -create index "ffinder_cid_idx" on ffinder ("cid"); -create index "ffinder_fid_idx" on ffinder ("fid"); - -CREATE TABLE "fserver" ( - "id" serial NOT NULL, - "server" text NOT NULL, - "posturl" text NOT NULL, - "key" text NOT NULL, - PRIMARY KEY ("id") -); -create index "fserver_server_idx" on fserver ("server"); -create index "fserver_posturl_idx" on fserver ("posturl"); - -CREATE TABLE "fsuggest" ( - "id" serial NOT NULL, - "uid" bigint NOT NULL, - "cid" bigint NOT NULL, - "name" text NOT NULL, - "url" text NOT NULL, - "request" text NOT NULL, - "photo" text NOT NULL, - "note" text NOT NULL, - "created" timestamp NOT NULL, - PRIMARY KEY ("id") -); CREATE TABLE "group_member" ( "id" serial NOT NULL, "uid" bigint NOT NULL, @@ -1179,19 +1123,6 @@ CREATE TABLE "source" ( create index "src_channel_id" on "source" ("src_channel_id"); create index "src_channel_xchan" on "source" ("src_channel_xchan"); create index "src_xchan" on "source" ("src_xchan"); -CREATE TABLE "spam" ( - "id" serial NOT NULL, - "uid" bigint NOT NULL, - "spam" bigint NOT NULL DEFAULT '0', - "ham" bigint NOT NULL DEFAULT '0', - "term" text NOT NULL, - "date" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', - PRIMARY KEY ("id") -); -create index "spam_uid" on spam ("uid"); -create index "spam_spam" on spam ("spam"); -create index "spam_ham" on spam ("ham"); -create index "spam_term" on spam ("term"); CREATE TABLE "sys_perms" ( "id" serial NOT NULL, "cat" text NOT NULL, diff --git a/install/update.php b/install/update.php index 686c199b5..0bd8d59f9 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1170 ); +define( 'UPDATE_VERSION' , 1171 ); /** * @@ -2131,4 +2131,19 @@ function update_r1169() { if($r1 && $r2 && $r3) return UPDATE_SUCCESS; return UPDATE_FAILED; +} + + +function update_r1170() { + + $r1 = q("drop table fcontact"); + $r2 = q("drop table ffinder"); + $r3 = q("drop table fserver"); + $r4 = q("drop table fsuggest"); + $r5 = q("drop table spam"); + + if($r1 && $r2 && $r3 && $r4 && $r5) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + }
\ No newline at end of file |