diff --git a/include/class.file.php b/include/class.file.php
index c0b844bfcf2c6227dae0e3cd86fbf1bbf5f93e57..d921d22dd96f61a87833b81d2b2fd60ff42e1fa7 100644
--- a/include/class.file.php
+++ b/include/class.file.php
@@ -386,6 +386,7 @@ class AttachmentFile extends VerySimpleModel {
             'key' => $file['key'],
             'ft' => $ft ?: 'T',
             'signature' => $file['signature'],
+            'created' => SqlFunction::NOW(),
         ));
 
         if (isset($file['size']))
diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php
index 3bb7a8fc22d9fc1d7db6cf3bd59d1f094b510f8c..6319d289b6c8bbf7618ecc7f70959d20ccfd9ada 100644
--- a/include/staff/login.tpl.php
+++ b/include/staff/login.tpl.php
@@ -47,7 +47,7 @@ if (count($ext_bks)) { ?>
 
     <div id="company">
         <div class="content">
-            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company); ?>
+            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company) ?: date('Y'); ?>
         </div>
     </div>
 </div>
diff --git a/include/staff/pwreset.login.php b/include/staff/pwreset.login.php
index 6eeb21b3432e820c9e1f74c5840d5598e18c9ba1..cc5d0ae89e62bcc1309e29afa5831d8591467457 100644
--- a/include/staff/pwreset.login.php
+++ b/include/staff/pwreset.login.php
@@ -29,7 +29,7 @@ $info = ($_POST)?Format::htmlchars($_POST):array();
 
     <div id="company">
         <div class="content">
-            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company); ?>
+            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company) ?: date('Y'); ?>
         </div>
     </div>
 </div>
diff --git a/include/staff/pwreset.php b/include/staff/pwreset.php
index 5a82af0094bcde49b247947abda915970000093e..eddd22a0c7d3582ed53c5c87c2ab20b274bb435a 100644
--- a/include/staff/pwreset.php
+++ b/include/staff/pwreset.php
@@ -27,7 +27,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array();
 
     <div id="company">
         <div class="content">
-            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company); ?>
+            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company) ?: date('Y'); ?>
         </div>
     </div>
 </div>
diff --git a/include/staff/pwreset.sent.php b/include/staff/pwreset.sent.php
index bb74b7b8b7b82343bfc49d3e416a5316e02f152a..0609f341651755323a6c78521148fad3156024a1 100644
--- a/include/staff/pwreset.sent.php
+++ b/include/staff/pwreset.sent.php
@@ -25,7 +25,7 @@ $info = ($_POST && $errors)?Format::htmlchars($_POST):array();
 
     <div id="company">
         <div class="content">
-            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company); ?>
+            <?php echo __('Copyright'); ?> &copy; <?php echo Format::htmlchars($ost->company) ?: date('Y'); ?>
         </div>
     </div>
 </div>
diff --git a/include/upgrader/streams/core/0d6099a6-98ad7d55.cleanup.sql b/include/upgrader/streams/core/0d6099a6-98ad7d55.cleanup.sql
index 362a9400529e15c70c6488810c9b8d28bf711566..292d6052862923fb66985c45bcac37bd088fbafc 100644
--- a/include/upgrader/streams/core/0d6099a6-98ad7d55.cleanup.sql
+++ b/include/upgrader/streams/core/0d6099a6-98ad7d55.cleanup.sql
@@ -6,6 +6,7 @@
  */
 
 DROP TABLE IF EXISTS `%TABLE_PREFIX%group_dept_access`;
+DROP TABLE IF EXISTS `%TABLE_PREFIX%group`;
 
 -- Drop `updated` if it exists (it stayed in the install script after it was
 -- removed from the update path
diff --git a/include/upgrader/streams/core/15b30765-dd0022fb.task.php b/include/upgrader/streams/core/15b30765-dd0022fb.task.php
index 755c57fe7bd159f09dadc16e8bf8a615b3889b0b..970136b1bc366f61c24a1915c03b957bed72d078 100644
--- a/include/upgrader/streams/core/15b30765-dd0022fb.task.php
+++ b/include/upgrader/streams/core/15b30765-dd0022fb.task.php
@@ -245,6 +245,7 @@ class AttachmentMigrater extends MigrationTask {
             'hash' => $file['hash'],
             'bk' => '6',
             'attrs' => $file['path'],
+            'created' => date('Y-m-d H:i:s', Misc::dbtime(filemtime($file['path']))),
         ));
     }
 }
diff --git a/include/upgrader/streams/core/1ee831c8-36f6b328.patch.sql b/include/upgrader/streams/core/1ee831c8-36f6b328.patch.sql
index 850441a57d1045b15c5f58d73831e8472bdbf3b4..a60fae20cf7a1181530723eca71433e470336948 100644
--- a/include/upgrader/streams/core/1ee831c8-36f6b328.patch.sql
+++ b/include/upgrader/streams/core/1ee831c8-36f6b328.patch.sql
@@ -26,6 +26,7 @@ ALTER TABLE `%TABLE_PREFIX%staff`
     ADD `role_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `dept_id`;
 
 ALTER TABLE  `%TABLE_PREFIX%groups`
+    RENAME TO `%TABLE_PREFIX%group`,
     CHANGE  `group_id`  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
     ADD  `role_id` INT UNSIGNED NOT NULL DEFAULT  '0' AFTER  `id`;
 
diff --git a/include/upgrader/streams/core/1ee831c8-36f6b328.task.php b/include/upgrader/streams/core/1ee831c8-36f6b328.task.php
index f70c4e2bfd22896d4f1219aee309a398aca6ca9c..982f690e70f3e0250cd7c351fad7fca0592c12a9 100644
--- a/include/upgrader/streams/core/1ee831c8-36f6b328.task.php
+++ b/include/upgrader/streams/core/1ee831c8-36f6b328.task.php
@@ -1,5 +1,5 @@
 <?php
-define('GROUP_TABLE', TABLE_PREFIX.'groups');
+define('GROUP_TABLE', TABLE_PREFIX.'group');
 define('GROUP_DEPT_TABLE', TABLE_PREFIX.'group_dept_access');
 class Group extends VerySimpleModel {
     static $meta = array(