Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function install(ServiceLocatorInterface $serviceLocator)
id INT AUTO_INCREMENT NOT NULL,
job_id INT NOT NULL,
undo_job_id INT DEFAULT NULL,
comment VARCHAR(255) DEFAULT NULL,
comment LONGTEXT DEFAULT NULL,
resource_type VARCHAR(255) NOT NULL,
has_err TINYINT(1) NOT NULL,
stats LONGTEXT NOT NULL COMMENT '(DC2Type:json_array)',
Expand Down Expand Up @@ -70,8 +70,9 @@ public function uninstall(ServiceLocatorInterface $serviceLocator)

public function upgrade($oldVersion, $newVersion, ServiceLocatorInterface $serviceLocator)
{
$connection = $serviceLocator->get('Omeka\Connection');

if (version_compare($oldVersion, '1.1.1-rc.1', '<')) {
$connection = $serviceLocator->get('Omeka\Connection');
$sql = <<<'SQL'
ALTER TABLE csvimport_import ADD stats LONGTEXT NOT NULL COMMENT '(DC2Type:json_array)';
UPDATE csvimport_import SET stats = CONCAT('{"processed":{"', resource_type, '":', added_count, '}}');
Expand All @@ -82,5 +83,9 @@ public function upgrade($oldVersion, $newVersion, ServiceLocatorInterface $servi
$connection->exec($sql);
}
}

if (version_compare($oldVersion, '2.6.3', '<')) {
$connection->executeStatement('ALTER TABLE csvimport_import MODIFY comment LONGTEXT DEFAULT NULL');
}
}
}
2 changes: 1 addition & 1 deletion config/module.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ author_link = "https://omeka.org/"
module_link = "https://omeka.org/s/docs/user-manual/modules/csvimport/"
support_link = "https://forum.omeka.org/c/omeka-s/modules"
configurable = false
version = "2.6.2"
version = "2.6.3"
omeka_version_constraint = "^4.0.0"
2 changes: 1 addition & 1 deletion src/Entity/CSVImportImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CSVImportImport extends AbstractEntity
protected $undoJob;

/**
* @Column(type="string", nullable=true)
* @Column(type="text", nullable=true)
*/
protected $comment;

Expand Down