[Rt-commit] rt branch, 4.2/set-articles-seq-nextval, repushed
Todd Wade
todd at bestpractical.com
Thu Mar 26 21:51:21 EDT 2015
The branch 4.2/set-articles-seq-nextval was deleted and repushed:
was 91d606843d6a8957e2840f8dd54d4b534a668c36
now 12a480c2b3c0c3af9d39a1350750c8be84975daf
1: 91d6068 ! 1: 12a480c properly migrate PostgreSQL Articles sequence objects https://issues.bestpractical.com/Ticket/Display.html?id=18248
@@ -1,9 +1,19 @@
Author: Todd Wade <todd at bestpractical.com>
- properly migrate PostgreSQL sequence objects
+ properly migrate PostgreSQL Articles sequence objects
https://issues.bestpractical.com/Ticket/Display.html?id=18248
- set the sequence value so that RT doesn't try to give new articles an id of 1
+ Set the articles sequence value to the max article id so that RT doesn't try
+ to give new articles an id of 1 after upgrading.
+
+ *NOTE* Oracle sequences haven't been tested and may need similar handling
+
+diff --git a/etc/upgrade/4.2.11/schema.Pg b/etc/upgrade/4.2.11/schema.Pg
+new file mode 100644
+--- /dev/null
++++ b/etc/upgrade/4.2.11/schema.Pg
+@@
++SELECT SETVAL('articles_id_seq', COALESCE( MAX(id), 1) ) FROM Articles;
diff --git a/etc/upgrade/upgrade-articles.in b/etc/upgrade/upgrade-articles.in
--- a/etc/upgrade/upgrade-articles.in
More information about the rt-commit
mailing list