From 5bca333bf02f2e4e6e0664e19f4e6c5db2fd680c Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 24 Mar 2018 21:57:50 +0000 Subject: [PATCH] Fix: No "not null" when text is replaced by varchar --- boot.php | 2 +- database.sql | 9 +++++---- src/Database/DBStructure.php | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/boot.php b/boot.php index fcdce92ccf..71050fe4d7 100644 --- a/boot.php +++ b/boot.php @@ -41,7 +41,7 @@ define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'The Tazmans Flax-lily'); define('FRIENDICA_VERSION', '2018-05-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1257); +define('DB_UPDATE_VERSION', 1258); define('NEW_UPDATE_ROUTINE_VERSION', 1170); /** diff --git a/database.sql b/database.sql index 8778a0c1c8..e8662f95c8 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2018-05-dev (The Tazmans Flax-lily) --- DB_UPDATE_VERSION 1257 +-- DB_UPDATE_VERSION 1258 -- ------------------------------------------ @@ -122,9 +122,9 @@ CREATE TABLE IF NOT EXISTS `contact` ( `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT '', `attag` varchar(255) NOT NULL DEFAULT '' COMMENT '', `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `photo` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `micro` varchar(255) NOT NULL DEFAULT '' COMMENT '', + `photo` varchar(255) DEFAULT '' COMMENT '', + `thumb` varchar(255) DEFAULT '' COMMENT '', + `micro` varchar(255) DEFAULT '' COMMENT '', `site-pubkey` text COMMENT '', `issued-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', `dfrn-id` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -1079,3 +1079,4 @@ CREATE TABLE IF NOT EXISTS `workerqueue` ( INDEX `executed` (`executed`) ) DEFAULT COLLATE utf8mb4_general_ci; + diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 9e6ce5b97f..5d527aac60 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -788,9 +788,9 @@ class DBStructure "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "micro" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], + "photo" => ["type" => "varchar(255)", "default" => "", "comment" => ""], + "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => ""], + "micro" => ["type" => "varchar(255)", "default" => "", "comment" => ""], "site-pubkey" => ["type" => "text", "comment" => ""], "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], -- 2.39.5