diff --git a/wicked/migration/4_wicked_single_revisions.php b/wicked/migration/4_wicked_single_revisions.php index aea44ac9be6..b18ba20168a 100644 --- a/wicked/migration/4_wicked_single_revisions.php +++ b/wicked/migration/4_wicked_single_revisions.php @@ -148,14 +148,14 @@ public function up() public function down() { /* Pages */ - $this->addColumn('wicked_pages', 'page_majorversion', 'integer', array('null' => false)); - $this->addColumn('wicked_pages', 'page_minorversion', 'integer', array('null' => false)); + $this->addColumn('wicked_pages', 'page_majorversion', 'integer', array('null' => false, 'default' => 0)); + $this->addColumn('wicked_pages', 'page_minorversion', 'integer', array('null' => false, 'default' => 0)); $this->update('UPDATE wicked_pages SET page_majorversion = page_version, page_minorversion = 0'); $this->removeColumn('wicked_pages', 'page_version'); $this->removePrimaryKey('wicked_history'); - $this->addColumn('wicked_history', 'page_majorversion', 'integer', array('null' => false)); - $this->addColumn('wicked_history', 'page_minorversion', 'integer', array('null' => false)); + $this->addColumn('wicked_history', 'page_majorversion', 'integer', array('null' => false, 'default' => 0)); + $this->addColumn('wicked_history', 'page_minorversion', 'integer', array('null' => false, 'default' => 0)); $this->update('UPDATE wicked_history SET page_majorversion = page_version, page_minorversion = 0'); $this->removeColumn('wicked_history', 'page_version'); $this->addPrimaryKey('wicked_history', array('page_id', 'page_majorversion', 'page_minorversion')); @@ -182,14 +182,14 @@ public function down() $attachment['attachment_version'] . '.0'); } - $this->addColumn('wicked_attachments', 'attachment_majorversion', 'integer', array('null' => false)); - $this->addColumn('wicked_attachments', 'attachment_minorversion', 'integer', array('null' => false)); + $this->addColumn('wicked_attachments', 'attachment_majorversion', 'integer', array('null' => false, 'default' => 0)); + $this->addColumn('wicked_attachments', 'attachment_minorversion', 'integer', array('null' => false, 'default' => 0)); $this->update('UPDATE wicked_attachments SET attachment_majorversion = attachment_version, attachment_minorversion = 0'); $this->removeColumn('wicked_attachments', 'attachment_version'); $this->removePrimaryKey('wicked_attachment_history'); - $this->addColumn('wicked_attachment_history', 'attachment_majorversion', 'integer', array('null' => false)); - $this->addColumn('wicked_attachment_history', 'attachment_minorversion', 'integer', array('null' => false)); + $this->addColumn('wicked_attachment_history', 'attachment_majorversion', 'integer', array('null' => false, 'default' => 0)); + $this->addColumn('wicked_attachment_history', 'attachment_minorversion', 'integer', array('null' => false, 'default' => 0)); $this->update('UPDATE wicked_attachment_history SET attachment_majorversion = attachment_version, attachment_minorversion = 0'); $this->removeColumn('wicked_attachment_history', 'attachment_version'); $this->addPrimaryKey('wicked_attachment_history', array('page_id', 'attachment_name', 'attachment_majorversion', 'attachment_minorversion'));