Autoincrement
authorJan Schneider <jan@horde.org>
Fri, 28 Jan 2011 20:34:57 +0000 (21:34 +0100)
committerJan Schneider <jan@horde.org>
Fri, 28 Jan 2011 20:35:13 +0000 (21:35 +0100)
framework/History/migration/Horde_History/2_horde_history_upgrade_autoincrement.php [new file with mode: 0644]

diff --git a/framework/History/migration/Horde_History/2_horde_history_upgrade_autoincrement.php b/framework/History/migration/Horde_History/2_horde_history_upgrade_autoincrement.php
new file mode 100644 (file)
index 0000000..0a2b20e
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+class HordeHistoryUpgradeAutoIncrement extends Horde_Db_Migration_Base
+{
+    public function up()
+    {
+        $this->changeColumn('horde_histories', 'history_id', 'integer', array('null' => false, 'unsigned' => true, 'default' => null, 'autoincrement' => true));
+    }
+
+    public function down()
+    {
+        $this->changeColumn('horde_histories', 'history_id', 'integer', array('null' => false, 'unsigned' => true));
+    }
+}
\ No newline at end of file