summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Schema/Pg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Schema/Pg.pm')
-rw-r--r--Bugzilla/DB/Schema/Pg.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema/Pg.pm b/Bugzilla/DB/Schema/Pg.pm
index 070c0b03e..3559bae9c 100644
--- a/Bugzilla/DB/Schema/Pg.pm
+++ b/Bugzilla/DB/Schema/Pg.pm
@@ -119,6 +119,12 @@ sub get_rename_table_sql {
return ("ALTER TABLE $old_name RENAME TO $new_name");
}
+sub get_set_serial_sql {
+ my ($self, $table, $column, $value) = @_;
+ return ("SELECT setval('${table}_${column}_seq', $value, false)
+ FROM $table");
+}
+
sub _get_alter_type_sql {
my ($self, $table, $column, $new_def, $old_def) = @_;
my @statements;