Skip to content

Commit

Permalink
fixed oc_calendars.components length and set oc_calendarsubscriptions…
Browse files Browse the repository at this point in the history
….lastmodified to be notnull, added todo
  • Loading branch information
phisch authored and DeepDiver1975 committed May 18, 2017
1 parent 59a55cd commit de295ca
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions core/Migrations/Version20170101215145.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public function changeSchema(Schema $schema, array $options) {

if ($calendarObjectsTable->hasColumn('componenttype')) {
$componentType = $calendarObjectsTable->getColumn('componenttype');
// TODO: check what happens when this contained data with length > 8
$componentType->setOptions(['length' => 8]);
}

Expand All @@ -297,5 +298,27 @@ public function changeSchema(Schema $schema, array $options) {
$lastOccurence->setType(Type::getType(Type::BIGINT));
}
}

if ($schema->hasTable("${prefix}calendars")) {
$calendarsTable = $schema->getTable("${prefix}calendars");

if ($calendarsTable->hasColumn('components')) {
$components = $calendarsTable->getColumn('components');
$components->setOptions(['length' => 20]);
}
}

if ($schema->hasTable("${prefix}calendarsubscriptions")) {
$calendarSubscriptionsTable = $schema->getTable("${prefix}calendarsubscriptions");

if ($calendarSubscriptionsTable->hasColumn('lastmodified')) {
$lastModified = $calendarSubscriptionsTable->getColumn('lastmodified');
$lastModified->setOptions(
[
'notnull' => true
]
);
}
}
}
}

0 comments on commit de295ca

Please sign in to comment.