diff --git a/resources/sql/autopatches/20140919.schema.01.calstatus.sql b/resources/sql/autopatches/20140919.schema.01.calstatus.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20140919.schema.01.calstatus.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_calendar.calendar_event + CHANGE status status INT UNSIGNED NOT NULL; diff --git a/resources/sql/autopatches/20140919.schema.02.calname.sql b/resources/sql/autopatches/20140919.schema.02.calname.sql new file mode 100644 --- /dev/null +++ b/resources/sql/autopatches/20140919.schema.02.calname.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_calendar.calendar_holiday + CHANGE name name VARCHAR(64) NOT NULL COLLATE utf8_general_ci; diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1300,6 +1300,7 @@ 'PhabricatorCalendarEventViewController' => 'applications/calendar/controller/PhabricatorCalendarEventViewController.php', 'PhabricatorCalendarHoliday' => 'applications/calendar/storage/PhabricatorCalendarHoliday.php', 'PhabricatorCalendarHolidayTestCase' => 'applications/calendar/storage/__tests__/PhabricatorCalendarHolidayTestCase.php', + 'PhabricatorCalendarSchemaSpec' => 'applications/calendar/storage/PhabricatorCalendarSchemaSpec.php', 'PhabricatorCalendarViewController' => 'applications/calendar/controller/PhabricatorCalendarViewController.php', 'PhabricatorCampfireProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorCampfireProtocolAdapter.php', 'PhabricatorChangeParserTestCase' => 'applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php', @@ -4208,6 +4209,7 @@ 'PhabricatorCalendarEventViewController' => 'PhabricatorCalendarController', 'PhabricatorCalendarHoliday' => 'PhabricatorCalendarDAO', 'PhabricatorCalendarHolidayTestCase' => 'PhabricatorTestCase', + 'PhabricatorCalendarSchemaSpec' => 'PhabricatorConfigSchemaSpec', 'PhabricatorCalendarViewController' => 'PhabricatorCalendarController', 'PhabricatorCampfireProtocolAdapter' => 'PhabricatorBotBaseStreamingProtocolAdapter', 'PhabricatorChangeParserTestCase' => 'PhabricatorWorkingCopyTestCase', diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -37,6 +37,12 @@ public function getConfiguration() { return array( self::CONFIG_AUX_PHID => true, + self::CONFIG_COLUMN_SCHEMA => array( + 'dateFrom' => 'epoch', + 'dateTo' => 'epoch', + 'status' => 'uint32', + 'description' => 'text', + ), ) + parent::getConfiguration(); } diff --git a/src/applications/calendar/storage/PhabricatorCalendarHoliday.php b/src/applications/calendar/storage/PhabricatorCalendarHoliday.php --- a/src/applications/calendar/storage/PhabricatorCalendarHoliday.php +++ b/src/applications/calendar/storage/PhabricatorCalendarHoliday.php @@ -8,6 +8,15 @@ public function getConfiguration() { return array( self::CONFIG_TIMESTAMPS => false, + self::CONFIG_COLUMN_SCHEMA => array( + 'day' => 'date', + 'name' => 'text64', + ), + self::CONFIG_KEY_SCHEMA => array( + 'day' => array( + 'columns' => array('day'), + ), + ), ) + parent::getConfiguration(); } diff --git a/src/applications/calendar/storage/PhabricatorCalendarSchemaSpec.php b/src/applications/calendar/storage/PhabricatorCalendarSchemaSpec.php new file mode 100644 --- /dev/null +++ b/src/applications/calendar/storage/PhabricatorCalendarSchemaSpec.php @@ -0,0 +1,10 @@ +buildLiskSchemata('PhabricatorCalendarDAO'); + } + +} diff --git a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php --- a/src/applications/config/schema/PhabricatorConfigSchemaSpec.php +++ b/src/applications/config/schema/PhabricatorConfigSchemaSpec.php @@ -292,6 +292,9 @@ case 'double': $column_type = 'double'; break; + case 'date': + $column_type = 'date'; + break; default: $column_type = pht(''); $charset = pht('');