schema/util/disable-user.sql | 2 -
schema/util/enable-user.sql | 2 -
web/modules/rhn/RHN/DB/Channel.pm | 4 +--
web/modules/rhn/RHN/DB/ChannelEditor.pm | 6 ++--
web/modules/rhn/RHN/DB/ConfigRevision.pm | 2 -
web/modules/rhn/RHN/DB/ContactGroup.pm | 2 -
web/modules/rhn/RHN/DB/CustomInfoKey.pm | 4 +--
web/modules/rhn/RHN/DB/FileList.pm | 2 -
web/modules/rhn/RHN/DB/KSTree.pm | 2 -
web/modules/rhn/RHN/DB/Kickstart.pm | 4 +--
web/modules/rhn/RHN/DB/Kickstart/Session.pm | 2 -
web/modules/rhn/RHN/DB/Notes.pm | 2 -
web/modules/rhn/RHN/DB/Org.pm | 12 ---------
web/modules/rhn/RHN/DB/Profile.pm | 2 -
web/modules/rhn/RHN/DB/Scheduler.pm | 22 +++++++++---------
web/modules/rhn/RHN/DB/Server.pm | 6 ++--
web/modules/rhn/RHN/DB/TemplateString.pm | 2 -
web/modules/sniglets/Sniglets/ListView/PackageList.pm | 2 -
web/modules/sniglets/Sniglets/Profiles.pm | 2 -
19 files changed, 35 insertions(+), 47 deletions(-)
New commits:
commit 3d092050bcc07f852acdd7e93bed053dbbcc5115
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:42:06 2012 +0100
rewrite rhn_wcon_disabled_seq.nextval to sequence_nextval('rhn_wcon_disabled_seq')
diff --git a/schema/util/disable-user.sql b/schema/util/disable-user.sql
index 6c710ba..e86e300 100644
--- a/schema/util/disable-user.sql
+++ b/schema/util/disable-user.sql
@@ -1,7 +1,7 @@
insert into rhnWebContactChangeLog
(id, web_contact_id, web_contact_from_id, change_state_id, date_completed)
values
-(rhn_wcon_disabled_seq.nextval,
+(sequence_nextval('rhn_wcon_disabled_seq'),
(select id from web_contact where login_uc = upper('$i')),
null,
(select id from rhnWebContactChangeState where label = 'disabled'),
diff --git a/schema/util/enable-user.sql b/schema/util/enable-user.sql
index ecca947..a048c90 100644
--- a/schema/util/enable-user.sql
+++ b/schema/util/enable-user.sql
@@ -1,7 +1,7 @@
insert into rhnWebContactChangeLog
(id, web_contact_id, web_contact_from_id, change_state_id, date_completed)
values
-(rhn_wcon_disabled_seq.nextval,
+(sequence_nextval('rhn_wcon_disabled_seq'),
(select id from web_contact where login_uc = upper('&login')),
null,
(select id from rhnWebContactChangeState where label = 'enabled'),
commit e55983b18015a4b5c00a441711eb51eca41115af
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 16:12:26 2012 +0100
rewrite rhn_confcontent_id_seq.nextval to sequence_nextval('rhn_confcontent_id_seq')
diff --git a/web/modules/rhn/RHN/DB/ConfigRevision.pm b/web/modules/rhn/RHN/DB/ConfigRevision.pm
index 786b24e..d6f28fc 100644
--- a/web/modules/rhn/RHN/DB/ConfigRevision.pm
+++ b/web/modules/rhn/RHN/DB/ConfigRevision.pm
@@ -109,7 +109,7 @@ sub create_config_contents {
INSERT INTO rhnConfigContent
(id, checksum_id, file_size, contents, delim_start, delim_end)
VALUES
- (rhn_confcontent_id_seq.nextval, lookup_checksum('md5', :md5sum), :file_size, :contents, :delim_start, :delim_end)
+ (sequence_nextval('rhn_confcontent_id_seq'), lookup_checksum('md5', :md5sum), :file_size, :contents, :delim_start, :delim_end)
RETURNING id INTO :ccid
EOS
commit 09989c78f930a628d51bd15a473b10a8ebe59f6c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:42:06 2012 +0100
use sequence_nextval rather then .nextval
diff --git a/web/modules/rhn/RHN/DB/ContactGroup.pm b/web/modules/rhn/RHN/DB/ContactGroup.pm
index f7d7f52..ed93042 100644
--- a/web/modules/rhn/RHN/DB/ContactGroup.pm
+++ b/web/modules/rhn/RHN/DB/ContactGroup.pm
@@ -176,7 +176,7 @@ sub commit {
my $dbh = RHN::DB->connect;
# Get the next recid from the sequence and set it as the id for this instance.
- my $sth = $dbh->prepare("SELECT " . $self->get_sequence . ".nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('" . $self->get_sequence . "') FROM DUAL");
$sth->execute;
my ($pk_value) = $sth->fetchrow;
die "No new $type $pk from seq " . $self->get_sequence . " (possible error: " . $sth->errstr . ")" unless $pk_value;
commit 4abe94b01d7445b0f59f177513b4fa6b133f4889
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 16:04:21 2012 +0100
rewrite rhn_cdatakey_id_seq.nextval to sequence_nextval('rhn_cdatakey_id_seq')
diff --git a/web/modules/rhn/RHN/DB/CustomInfoKey.pm b/web/modules/rhn/RHN/DB/CustomInfoKey.pm
index a7f28c4..3a0e922 100644
--- a/web/modules/rhn/RHN/DB/CustomInfoKey.pm
+++ b/web/modules/rhn/RHN/DB/CustomInfoKey.pm
@@ -68,10 +68,10 @@ sub commit {
if ($self->id == -1) {
my $dbh = $transaction || RHN::DB->connect;
- my $sth = $dbh->prepare("SELECT rhn_cdatakey_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_cdatakey_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
- die "No new channel id from seq rhn_cdatakey_id_seq.nextval (possible error: " . $sth->errstr . ")" unless $id;
+ die "No new channel id from seq rhn_cdatakey_id_seq (possible error: " . $sth->errstr . ")" unless $id;
$sth->finish;
$self->{":modified:"}->{id} = 1;
commit bf50a431f937b92ad7389c9a81defca6fc0f287c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 16:02:28 2012 +0100
rewrite rhn_filelist_id_seq.nextval to sequence_nextval('rhn_filelist_id_seq')
diff --git a/web/modules/rhn/RHN/DB/FileList.pm b/web/modules/rhn/RHN/DB/FileList.pm
index 51c9e6b..8255b7b 100644
--- a/web/modules/rhn/RHN/DB/FileList.pm
+++ b/web/modules/rhn/RHN/DB/FileList.pm
@@ -98,7 +98,7 @@ sub commit {
if ($self->id == -1) {
my $dbh = RHN::DB->connect;
- my $sth = $dbh->prepare("SELECT rhn_filelist_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_filelist_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
die "No new file list id from seq rhn_filelist_id_seq (possible error: " . $sth->errstr . ")" unless $id;
commit 7037fce33c7efdd0e4d4423f12578746111931d2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 16:00:22 2012 +0100
rewrite rhn_kstree_id_seq.nextval to sequence_nextval('rhn_kstree_id_seq')
diff --git a/web/modules/rhn/RHN/DB/KSTree.pm b/web/modules/rhn/RHN/DB/KSTree.pm
index 75f1562..5ec27d9 100644
--- a/web/modules/rhn/RHN/DB/KSTree.pm
+++ b/web/modules/rhn/RHN/DB/KSTree.pm
@@ -109,7 +109,7 @@ sub create_tree {
INSERT INTO rhnKickstartableTree
(id, label, base_path, channel_id, boot_image, org_id, kstree_type, install_type)
VALUES
- (rhn_kstree_id_seq.nextval, :label, :path, :channel_id, :boot_image, :org_id,
+ (sequence_nextval('rhn_kstree_id_seq'), :label, :path, :channel_id, :boot_image, :org_id,
(SELECT id FROM rhnKSTreeType WHERE label = :tree_type),
(SELECT id FROM rhnKSInstallType WHERE label = :install_type_label)
)
commit 3cd054f4347b7777abf18040fdbecf1d56ae5e7c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:47:07 2012 +0100
rewrite rhn_ksscript_id_seq.nextval to sequence_nextval('rhn_ksscript_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Kickstart.pm b/web/modules/rhn/RHN/DB/Kickstart.pm
index e3a41ed..cddfed3 100644
--- a/web/modules/rhn/RHN/DB/Kickstart.pm
+++ b/web/modules/rhn/RHN/DB/Kickstart.pm
@@ -380,7 +380,7 @@ INSERT
, script_type
, interpreter
, data)
- VALUES (rhn_ksscript_id_seq.nextval
+ VALUES (sequence_nextval('rhn_ksscript_id_seq')
, :ksid
, :position
, :stype
commit b5a7e6d4051b0243e78e7731ada30f5c70f25f3f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:45:44 2012 +0100
rewrite rhn_ks_id_seq.nextval to sequence_nextval('rhn_ks_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Kickstart.pm b/web/modules/rhn/RHN/DB/Kickstart.pm
index 7645bc7..e3a41ed 100644
--- a/web/modules/rhn/RHN/DB/Kickstart.pm
+++ b/web/modules/rhn/RHN/DB/Kickstart.pm
@@ -107,7 +107,7 @@ sub commit {
my $mode = 'update';
if (not $self->id) {
- my $sth = $dbh->prepare("SELECT rhn_ks_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_ks_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
die "No new id from seq rhn_ks_id_seq (possible error: " . $sth->errstr . ")" unless $id;
commit 0f2d10ec30d5b8de45dad843b3fff45d12171a02
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:43:53 2012 +0100
rewrite rhn_ks_session_id_seq.nextval to sequence_nextval('rhn_ks_session_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Kickstart/Session.pm b/web/modules/rhn/RHN/DB/Kickstart/Session.pm
index 694da68..94261c5 100644
--- a/web/modules/rhn/RHN/DB/Kickstart/Session.pm
+++ b/web/modules/rhn/RHN/DB/Kickstart/Session.pm
@@ -188,7 +188,7 @@ sub commit {
my $mode = 'update';
if ($self->id == -1) {
- my $sth = $dbh->prepare("SELECT rhn_ks_session_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_ks_session_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
die "No new kickstart session id from seq rhn_ks_session_id_seq (possible error: " . $sth->errstr . ")" unless $id;
commit 8d7216eb70c042546d0699f52d5dc96bd51e8c80
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:42:06 2012 +0100
use sequence_nextval rather then .nextval
diff --git a/web/modules/rhn/RHN/DB/Notes.pm b/web/modules/rhn/RHN/DB/Notes.pm
index bbd4de3..131c593 100644
--- a/web/modules/rhn/RHN/DB/Notes.pm
+++ b/web/modules/rhn/RHN/DB/Notes.pm
@@ -115,7 +115,7 @@ sub commit {
if ($self->id == -1)
{
$mode = 'insert';
- $query = "SELECT ". $self->sequence . ".nextval FROM DUAL";
+ $query = "SELECT sequence_nextval('". $self->sequence . "') FROM DUAL";
$sth = $dbh->prepare($query);
$sth->execute;
commit c6cdf7c83c49a60d80d93513b110245b4ef38199
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:37:20 2012 +0100
code cleanup - sequence rhn_org_id_seq is not defined
since it is not defined, it could not be used. And since no one was in this section of broken code for years, no one will miss it
diff --git a/web/modules/rhn/RHN/DB/Org.pm b/web/modules/rhn/RHN/DB/Org.pm
index a675cd4..0839361 100644
--- a/web/modules/rhn/RHN/DB/Org.pm
+++ b/web/modules/rhn/RHN/DB/Org.pm
@@ -157,17 +157,7 @@ sub commit {
my $mode = 'update';
if ($self->id == -1) {
- my $dbh = RHN::DB->connect;
-
- my $sth = $dbh->prepare("SELECT rhn_org_id_seq.nextval FROM DUAL");
- $sth->execute;
- my ($id) = $sth->fetchrow;
- die "No new org id from seq rhn_org_id_seq (possible error: " . $sth->errstr . ")" unless $id;
- $sth->finish;
-
- $self->{":modified:"}->{id} = 1;
- $self->{__id__} = $id;
- $mode = 'insert';
+ die "dead code - how did you get here?";
}
die "$self->commit called on org without valid id" unless $self->id and $self->id > 0;
commit b3c74222f068ed0a97d65708940879b0357b1c71
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 15:19:53 2012 +0100
rewrite rhn_server_profile_id_seq.nextval to sequence_nextval('rhn_server_profile_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Profile.pm b/web/modules/rhn/RHN/DB/Profile.pm
index 485020c..6504117 100644
--- a/web/modules/rhn/RHN/DB/Profile.pm
+++ b/web/modules/rhn/RHN/DB/Profile.pm
@@ -129,7 +129,7 @@ sub commit {
my $dbh = $transaction || RHN::DB->connect;
if ($self->id == -1) {
- my $sth = $dbh->prepare("SELECT rhn_server_profile_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_server_profile_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
$sth->finish;
commit aa5c6a399aea91b7edeea138a05d5f6af10cda90
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:59:39 2012 +0100
code cleanup - callback rhn:sync_server_cb is not used
the body of this callback is used from web/modules/sniglets/Sniglets/ListView/PackageList.pm: Sniglets::Profiles::sync_server_cb($pxt, $label);
diff --git a/web/modules/sniglets/Sniglets/Profiles.pm b/web/modules/sniglets/Sniglets/Profiles.pm
index 54f08d7..6057cfb 100644
--- a/web/modules/sniglets/Sniglets/Profiles.pm
+++ b/web/modules/sniglets/Sniglets/Profiles.pm
@@ -27,8 +27,6 @@ use PXT::Utils;
sub register_callbacks {
my $class = shift;
my $pxt = shift;
-
- $pxt->register_callback('rhn:sync_server_cb' => \&sync_server_cb);
}
sub sync_server_cb {
commit 9d97154d7e5930c2a802f2d2b4fa8c817d9c51aa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:47:11 2012 +0100
rewrite rhn_packagedelta_id_seq.nextval to sequence_nextval('rhn_packagedelta_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Scheduler.pm b/web/modules/rhn/RHN/DB/Scheduler.pm
index d237003..59e863a 100644
--- a/web/modules/rhn/RHN/DB/Scheduler.pm
+++ b/web/modules/rhn/RHN/DB/Scheduler.pm
@@ -1240,7 +1240,7 @@ sub schedule_package_sync {
my $sth;
$sth = $dbh->prepare(<<EOS);
-SELECT rhn_packagedelta_id_seq.nextval FROM DUAL
+SELECT sequence_nextval('rhn_packagedelta_id_seq') FROM DUAL
EOS
$sth->execute_h();
my ($delta_id) = $sth->fetchrow;
commit ef52911e00b875243626238b59c015d9a1e4e052
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:43:42 2012 +0100
rewrite rhn_actioncr_id_seq.nextval to sequence_nextval('rhn_actioncr_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Scheduler.pm b/web/modules/rhn/RHN/DB/Scheduler.pm
index 4e34bb4..d237003 100644
--- a/web/modules/rhn/RHN/DB/Scheduler.pm
+++ b/web/modules/rhn/RHN/DB/Scheduler.pm
@@ -1411,7 +1411,7 @@ sub schedule_config_action {
INSERT
INTO rhnActionConfigRevision
(id, action_id, server_id, config_revision_id)
-VALUES (rhn_actioncr_id_seq.nextval, :aid, :server_id, :revision_id)
+VALUES (sequence_nextval('rhn_actioncr_id_seq'), :aid, :server_id, :revision_id)
EOQ
$sth = $dbh->prepare($query);
commit b2bd80fb5f3714ddcafd6b050def84f812671649
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:41:09 2012 +0100
rewrite rhn_act_p_id_seq.nextval to sequence_nextval('rhn_act_p_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Scheduler.pm b/web/modules/rhn/RHN/DB/Scheduler.pm
index e47187a..4e34bb4 100644
--- a/web/modules/rhn/RHN/DB/Scheduler.pm
+++ b/web/modules/rhn/RHN/DB/Scheduler.pm
@@ -379,7 +379,7 @@ EOQ
$query = <<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id)
-SELECT rhn_act_p_id_seq.nextval,
+SELECT sequence_nextval('rhn_act_p_id_seq'),
:action_id,
P.name_id,
P.evr_id
@@ -477,7 +477,7 @@ EOQ
$query = <<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id)
(
-SELECT rhn_act_p_id_seq.nextval, ?, SP.name_id, SP.evr_id
+SELECT sequence_nextval('rhn_act_p_id_seq'), ?, SP.name_id, SP.evr_id
FROM rhnServerPackage SP, rhnSet PACKAGE_LIST
WHERE PACKAGE_LIST.user_id = ?
AND PACKAGE_LIST.label = '$label'
@@ -575,7 +575,7 @@ EOQ
$sth = $dbh->prepare(<<EOQ);
INSERT
INTO rhnActionPackage (id, action_id, name_id, evr_id)
-VALUES (rhn_act_p_id_seq.nextval, :aid, :name_id, :evr_id)
+VALUES (sequence_nextval('rhn_act_p_id_seq'), :aid, :name_id, :evr_id)
EOQ
foreach my $package (@packages) {
@@ -699,7 +699,7 @@ EOQ
if ($package_set) {
$query = <<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id)
-(SELECT rhn_act_p_id_seq.nextval, ?, element, element_two FROM rhnSet WHERE user_id = ? AND label = ?)
+(SELECT sequence_nextval('rhn_act_p_id_seq'), ?, element, element_two FROM rhnSet WHERE user_id = ? AND label = ?)
EOQ
$sth = $dbh->prepare($query);
# warn "ins query: $query\n$id, $user_id, ".$packages->label;
@@ -717,7 +717,7 @@ EOQ
elsif ($package_ids) {
$query =<<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id)
-(SELECT rhn_act_p_id_seq.nextval, ?, P.name_id, P.evr_id FROM rhnPackage P WHERE P.id = ?)
+(SELECT sequence_nextval('rhn_act_p_id_seq'), ?, P.name_id, P.evr_id FROM rhnPackage P WHERE P.id = ?)
EOQ
$sth = $dbh->prepare($query);
@@ -842,7 +842,7 @@ EOQ
($label eq 'patchset_installable_list')) {
$query = <<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id, package_arch_id)
-SELECT rhn_act_p_id_seq.nextval,
+SELECT sequence_nextval('rhn_act_p_id_seq'),
:action_id,
P.name_id,
P.evr_id,
@@ -868,7 +868,7 @@ EOQ
} else {
$query = <<EOQ;
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id, package_arch_id)
-SELECT rhn_act_p_id_seq.nextval,
+SELECT sequence_nextval('rhn_act_p_id_seq'),
:action_id,
P.name_id,
P.evr_id,
@@ -952,7 +952,7 @@ EOQ
if ($package_set) {
$sth = $dbh->prepare(<<EOQ);
INSERT INTO rhnActionPackage (id, action_id, name_id, evr_id)
-(SELECT rhn_act_p_id_seq.nextval, ?, element, element_two FROM rhnSet WHERE user_id = ? AND label = ?)
+(SELECT sequence_nextval('rhn_act_p_id_seq'), ?, element, element_two FROM rhnSet WHERE user_id = ? AND label = ?)
EOQ
$sth->execute($id, $user_id, $package_set->label);
}
@@ -965,7 +965,7 @@ EOQ
INSERT
INTO rhnActionPackage
(id, action_id, name_id, evr_id)
-VALUES (rhn_act_p_id_seq.nextval, ?, ?, ?)
+VALUES (sequence_nextval('rhn_act_p_id_seq'), ?, ?, ?)
EOQ
foreach my $pid_combo (@{$package_id_combos}) {
commit 84f84070cc392267526723f481b0474e38038ed9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:34:12 2012 +0100
rewrite rhn_server_loc_id_seq.nextval to sequence_nextval('rhn_server_loc_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Server.pm b/web/modules/rhn/RHN/DB/Server.pm
index a9ba073..0b60b0a 100644
--- a/web/modules/rhn/RHN/DB/Server.pm
+++ b/web/modules/rhn/RHN/DB/Server.pm
@@ -1224,7 +1224,7 @@ sub commit {
$self->{":modified:"}->{id} = 1;
$self->{__id__} = $id;
- $sth = $dbh->prepare("SELECT rhn_server_loc_id_seq.nextval FROM DUAL");
+ $sth = $dbh->prepare("SELECT sequence_nextval('rhn_server_loc_id_seq') FROM DUAL");
$sth->execute;
my ($location_id) = $sth->fetchrow;
die "No new location id from seq rhn_server_loc_id_seq (possible error: " . $sth->errstr . ")" unless $id;
@@ -1268,7 +1268,7 @@ sub commit {
$sth->finish;
if (not $exists) {
- my $sth = $dbh->prepare('INSERT INTO rhnServerLocation (id, server_id) VALUES (rhn_server_loc_id_seq.nextval, ?)');
+ my $sth = $dbh->prepare('INSERT INTO rhnServerLocation (id, server_id) VALUES (sequence_nextval('rhn_server_loc_id_seq'), ?)');
$sth->execute($self->id);
}
}
commit 3da5eba4929ef23d9e4ae97572c759a7530e2b7c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:31:47 2012 +0100
rewrite rhn_server_id_seq.nextval to sequence_nextval('rhn_server_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Server.pm b/web/modules/rhn/RHN/DB/Server.pm
index 70ac71f..a9ba073 100644
--- a/web/modules/rhn/RHN/DB/Server.pm
+++ b/web/modules/rhn/RHN/DB/Server.pm
@@ -1215,7 +1215,7 @@ sub commit {
if ($self->{__newly_created__}) {
croak "$self->commit called on newly created object when id != -1\nid == $self->{__id__}" unless $self->{__id__} == -1;
- $sth = $dbh->prepare("SELECT rhn_server_id_seq.nextval FROM DUAL");
+ $sth = $dbh->prepare("SELECT sequence_nextval('rhn_server_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
die "No new server id from seq rhn_server_id_seq (possible error: " . $sth->errstr . ")" unless $id;
commit da168275169bde1dda34cd185b70eaf7cbfdc878
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:27:52 2012 +0100
rewrite rhn_template_str_id_seq.nextval to sequence_nextval('rhn_template_str_id_seq')
diff --git a/web/modules/rhn/RHN/DB/TemplateString.pm b/web/modules/rhn/RHN/DB/TemplateString.pm
index 5e20803..eb6845e 100644
--- a/web/modules/rhn/RHN/DB/TemplateString.pm
+++ b/web/modules/rhn/RHN/DB/TemplateString.pm
@@ -157,7 +157,7 @@ sub commit {
my $mode = 'update';
if ($self->id == -1) {
- my $sth = $dbh->prepare("SELECT rhn_template_str_id_seq.nextval FROM DUAL");
+ my $sth = $dbh->prepare("SELECT sequence_nextval('rhn_template_str_id_seq') FROM DUAL");
$sth->execute;
my ($id) = $sth->fetchrow;
die "No id from rhn_template_str_id_seq (possible error: " . $sth->errstr . ")" unless $id;
commit 815dd7c3be175eb28d3ceb00bbd5e1ff5137b899
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Jan 31 14:24:07 2012 +0100
rewrite rhn_repo_regen_queue_id_seq.nextval to sequence_nextval('rhn_repo_regen_queue_id_seq')
diff --git a/web/modules/rhn/RHN/DB/Channel.pm b/web/modules/rhn/RHN/DB/Channel.pm
index e424d58..b3b798c 100644
--- a/web/modules/rhn/RHN/DB/Channel.pm
+++ b/web/modules/rhn/RHN/DB/Channel.pm
@@ -920,7 +920,7 @@ EOQ
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::remove_packages_in_set', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ
@@ -956,7 +956,7 @@ EOQ
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::add_packages_in_set', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ
diff --git a/web/modules/rhn/RHN/DB/ChannelEditor.pm b/web/modules/rhn/RHN/DB/ChannelEditor.pm
index 1d2d7e9..011324c 100644
--- a/web/modules/rhn/RHN/DB/ChannelEditor.pm
+++ b/web/modules/rhn/RHN/DB/ChannelEditor.pm
@@ -252,7 +252,7 @@ EOQ
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::remove_channel_packages', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ
@@ -579,7 +579,7 @@ EOQ
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::remove_errata_from_channel', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ
@@ -648,7 +648,7 @@ EOQ
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::add_errata_to_channel', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ
diff --git a/web/modules/sniglets/Sniglets/ListView/PackageList.pm b/web/modules/sniglets/Sniglets/ListView/PackageList.pm
index f5b1d25..5b5fece 100644
--- a/web/modules/sniglets/Sniglets/ListView/PackageList.pm
+++ b/web/modules/sniglets/Sniglets/ListView/PackageList.pm
@@ -1162,7 +1162,7 @@ sub delete_packages_cb {
INSERT
INTO rhnRepoRegenQueue
(id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
-VALUES (rhn_repo_regen_queue_id_seq.nextval,
+VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
:label, 'perl-web::delete_packages_cb', NULL, 'N', 'N', sysdate, sysdate, sysdate)
EOQ