[Rt-commit] rt branch, 4.4/reset-sequences, repushed
Jim Brandt
jbrandt at bestpractical.com
Fri Jul 13 15:39:51 EDT 2018
The branch 4.4/reset-sequences was deleted and repushed:
was ada197dacd823489129f6efeb0c9232a96df648e
now 3f627bd3ea2358a43463a0d98be28837b5ba0608
1: 6683b51c1 = 1: 6683b51c1 Script to automatically update DB sequences to the next available value
2: ada197dac ! 2: 3f627bd3e Use correct sequence name for Pg tables
@@ -15,7 +15,14 @@
."User:\t$db_user\nDBA:\t$dba_user" . ($args{'skip-create'} ? ' (No DBA)' : '') . "\n\n";
foreach my $table ( keys %$found_tables ){
-+ my $pg_seq = my $pg_seq = $table =~ /^OBJECTCUSTOMFIELD(S|VALUES)$/ ? '_id_s' : '_id_seq';
++
++ my $pg_seq = '_id_seq';
++
++ # Two of the Pg sequences don't follow the standard _id_seq ending
++ if ( $table eq 'OBJECTCUSTOMFIELDS' or $table eq 'OBJECTCUSTOMFIELDVALUES' ){
++ $pg_seq = '_id_s';
++ }
++
fix_id_sequence($table, {
- Pg => lc($table) . '_id_seq',
+ Pg => lc($table) . $pg_seq,
More information about the rt-commit
mailing list