Skip to content

Commit 9c0c630

Browse files
committed
Add "added" migration and bump version to 2.0.4
1 parent 21b57ad commit 9c0c630

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CsvImportPlugin.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ public function hookUpgrade($args)
161161
$newVersion = $args['new_version'];
162162
$db = $this->_db;
163163

164+
// Do this first because MySQL will complain about any ALTERs to a table with an
165+
// invalid default if we don't fix it first
166+
if (version_compare($oldVersion, '2.0.3', '<=')) {
167+
$sql = "ALTER TABLE `{$db->prefix}csv_import_imports` MODIFY `added` timestamp NOT NULL default '2000-01-01 00:00:00'";
168+
$db->query($sql);
169+
}
170+
164171
if (version_compare($oldVersion, '2.0-dev', '<=')) {
165172
$sql = "UPDATE `{$db->prefix}csv_import_imports` SET `status` = ? WHERE `status` = ?";
166173
$db->query($sql, array('other_error', 'error'));

plugin.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name="CSV Import"
33
author="Roy Rosenzweig Center for History and New Media"
44
description="Imports items, tags, and files from CSV files."
55
link="http://omeka.org/codex/Plugins/CSV_Import_2.0"
6-
version="2.0.3"
6+
version="2.0.4"
77
support_link="http://omeka.org/forums/forum/plugins"
88
license="GPL"
99
omeka_minimum_version="2.0"

0 commit comments

Comments
 (0)