31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-05-28 19:40:47 +00:00

Allow empty SHA and don't insert it on fetch routine

This commit is contained in:
Michael Babker 2016-03-27 13:46:05 -04:00
parent 5e60b09f80
commit d7057adff6
4 changed files with 4 additions and 5 deletions

View File

@ -324,7 +324,6 @@ class PullsModel extends \JModelDatabase
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->title, 150)),
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->body, 100)),
$this->getDb()->quote($pull->pull_request->url),
$this->getDb()->quote(/*$pull->head->sha*/'')
);
$data[] = implode($pullData, ',');
@ -334,7 +333,7 @@ class PullsModel extends \JModelDatabase
$this->getDb()->setQuery(
$this->getDb()->getQuery(true)
->insert('#__patchtester_pulls')
->columns(array('pull_id', 'title', 'description', 'pull_url', 'sha'))
->columns(array('pull_id', 'title', 'description', 'pull_url'))
->values($data)
);

View File

@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS `#__patchtester_pulls` (
`title` varchar(200) NOT NULL,
`description` varchar(150) NOT NULL DEFAULT '',
`pull_url` varchar(255) NOT NULL,
`sha` varchar(40) NOT NULL,
`sha` varchar(40) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS "#__patchtester_pulls" (
"title" character varying(200) NOT NULL,
"description" character varying(150) DEFAULT '' NOT NULL,
"pull_url" character varying(255) NOT NULL,
"sha" character varying(40) NOT NULL,
"sha" character varying(40) DEFAULT '' NOT NULL,
PRIMARY KEY ("id")
);

View File

@ -4,7 +4,7 @@ CREATE TABLE [#__patchtester_pulls] (
[title] [nvarchar](200) NOT NULL,
[description] [nvarchar](150) NOT NULL DEFAULT '',
[pull_url] [nvarchar](255) NOT NULL,
[sha] [nvarchar](40) NOT NULL,
[sha] [nvarchar](40) NOT NULL DEFAULT '',
CONSTRAINT [PK_#__patchtester_pulls] PRIMARY KEY CLUSTERED
(
[id] ASC