diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 6 | ||||
-rw-r--r-- | install/schema_postgres.sql | 7 | ||||
-rw-r--r-- | install/update.php | 39 |
3 files changed, 49 insertions, 3 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index e143e252a..be5317722 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -114,7 +114,7 @@ CREATE TABLE IF NOT EXISTS `app` ( `app_sig` char(255) NOT NULL DEFAULT '', `app_author` char(255) NOT NULL DEFAULT '', `app_name` char(255) NOT NULL DEFAULT '', - `app_desc` text NOT NULL, + `app_desc` text NOT NULL DEFAULT '', `app_url` char(255) NOT NULL DEFAULT '', `app_photo` char(255) NOT NULL DEFAULT '', `app_version` char(255) NOT NULL DEFAULT '', @@ -125,6 +125,7 @@ CREATE TABLE IF NOT EXISTS `app` ( `app_requires` char(255) NOT NULL DEFAULT '', `app_deleted` int(11) NOT NULL DEFAULT '0', `app_system` int(11) NOT NULL DEFAULT '0', + `app_plugin` char(255) NOT NULL DEFAULT '', `app_created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `app_edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', PRIMARY KEY (`id`), @@ -897,6 +898,7 @@ CREATE TABLE IF NOT EXISTS `outq` ( `outq_delivered` tinyint(1) NOT NULL DEFAULT '0', `outq_created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `outq_updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', + `outq_scheduled` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `outq_notify` mediumtext NOT NULL, `outq_msg` mediumtext NOT NULL, `outq_priority` smallint(6) NOT NULL DEFAULT '0', @@ -906,6 +908,7 @@ CREATE TABLE IF NOT EXISTS `outq` ( KEY `outq_hub` (`outq_posturl`), KEY `outq_created` (`outq_created`), KEY `outq_updated` (`outq_updated`), + KEY `outq_scheduled` (`outq_scheduled`), KEY `outq_async` (`outq_async`), KEY `outq_delivered` (`outq_delivered`), KEY `outq_priority` (`outq_priority`) @@ -1058,6 +1061,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `photo` char(255) NOT NULL DEFAULT '', `thumb` char(255) NOT NULL DEFAULT '', `publish` tinyint(1) NOT NULL DEFAULT '0', + `profile_vcard` text NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `guid` (`profile_guid`,`uid`), KEY `uid` (`uid`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index b1b1c8474..e78425828 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -111,7 +111,7 @@ CREATE TABLE "app" ( "app_sig" text NOT NULL DEFAULT '', "app_author" text NOT NULL DEFAULT '', "app_name" text NOT NULL DEFAULT '', - "app_desc" text NOT NULL, + "app_desc" text NOT NULL DEFAULT '', "app_url" text NOT NULL DEFAULT '', "app_photo" text NOT NULL DEFAULT '', "app_version" text NOT NULL DEFAULT '', @@ -122,6 +122,7 @@ CREATE TABLE "app" ( "app_requires" text NOT NULL DEFAULT '', "app_deleted" smallint NOT NULL DEFAULT '0', "app_system" smallint NOT NULL DEFAULT '0', + "app_plugin" text NOT NULL DEFAULT '', "app_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "app_edited" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', PRIMARY KEY ("id") @@ -138,6 +139,7 @@ create index "app_edited" on app ("app_edited"); create index "app_deleted" on app ("app_deleted"); create index "app_system" on app ("app_system"); + CREATE TABLE "atoken" ( "atoken_id" serial NOT NULL, "atoken_aid" bigint NOT NULL DEFAULT 0, @@ -882,6 +884,7 @@ CREATE TABLE "outq" ( "outq_delivered" numeric(1) NOT NULL DEFAULT '0', "outq_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "outq_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', + "outq_scheduled" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "outq_notify" text NOT NULL, "outq_msg" text NOT NULL, "outq_priority" smallint NOT NULL DEFAULT '0', @@ -892,6 +895,7 @@ create index "outq_channel" on outq ("outq_channel"); create index "outq_hub" on outq ("outq_posturl"); create index "outq_created" on outq ("outq_created"); create index "outq_updated" on outq ("outq_updated"); +create index "outq_scheduled" on outq ("outq_scheduled"); create index "outq_async" on outq ("outq_async"); create index "outq_delivered" on outq ("outq_delivered"); create index "outq_priority" on outq ("outq_priority"); @@ -1041,6 +1045,7 @@ CREATE TABLE "profile" ( "photo" text NOT NULL, "thumb" text NOT NULL, "publish" numeric(1) NOT NULL DEFAULT '0', + "profile_vcard" text NOT NULL DEFAULT '', PRIMARY KEY ("id"), UNIQUE ("profile_guid","uid") diff --git a/install/update.php b/install/update.php index dbf3a08ca..87cf4ba60 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1185 ); +define( 'UPDATE_VERSION' , 1188 ); /** * @@ -2472,3 +2472,40 @@ function update_r1184() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1185() { + + $r1 = q("alter table app add app_plugin char(255) not null default '' "); + + if($r1) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + +function update_r1186() { + + $r1 = q("alter table profile add profile_vcard text not null"); + + if($r1) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + + +} + +function update_r1187() { + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("alter table outq add outq_scheduled timestamp not null default '0001-01-01 00:00:00' "); + } + else { + $r1 = q("alter table outq add outq_scheduled datetime not null default '0001-01-01 00:00:00' "); + } + $r2 = q("create index outq_scheduled_idx on outq (outq_scheduled)"); + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + + +}
\ No newline at end of file |