diff options
author | zotlabs <mike@macgirvin.com> | 2016-12-14 19:11:01 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-12-14 19:11:01 -0800 |
commit | bae28965abb179948ccd50eabdc2c038a58b9b03 (patch) | |
tree | dfb9503bec536f0a8a03a92bbc4cd883e278e864 /install | |
parent | 63efbdffe6ef653e1556a7b34ea59b75b234e759 (diff) | |
download | volse-hubzilla-bae28965abb179948ccd50eabdc2c038a58b9b03.tar.gz volse-hubzilla-bae28965abb179948ccd50eabdc2c038a58b9b03.tar.bz2 volse-hubzilla-bae28965abb179948ccd50eabdc2c038a58b9b03.zip |
issue #446 apps usability - disable app if attached to a plugin that is uninstalled, allow system apps to be soft deleted and undeleted from the edit pane.
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 3 | ||||
-rw-r--r-- | install/schema_postgres.sql | 4 | ||||
-rw-r--r-- | install/update.php | 11 |
3 files changed, 15 insertions, 3 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index e143e252a..3f53ea907 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`), diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index b1b1c8474..1a51ff718 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, diff --git a/install/update.php b/install/update.php index dbf3a08ca..eca7011a8 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1185 ); +define( 'UPDATE_VERSION' , 1186 ); /** * @@ -2472,3 +2472,12 @@ 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; +} |