<div dir="ltr">After looking at all of the schema.Pg files after 4.1.1, it looks like all of the changes have already been applied.  The subsequent changes in the 4.1.1 script have also been applied already (Disabled column was added, Stage and Queue columns were removed), so I don't think it would work to patch my 4.1.1 file and run the upgrade again.  <div>
<br></div><div>From what I can tell, the upgrade was successful the first time and failed the second time, which is probably for the best anyway.  I'm not sure what caused that, but I did notify Dominic about it.  I guess unless I notice any problems, I'm just going to leave it and consider it to be normal/clean.</div>
<div><br></div><div>Thanks,</div><div>Nate<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 4:23 PM, Nathan Baker <span dir="ltr"><<a href="mailto:bakern@gmail.com" target="_blank">bakern@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><div class="">On Wed, May 21, 2014 at 1:22 PM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Wed, May 21, 2014 at 11:33:20AM -0400, Nathan Baker wrote:<br>


> Hello everyone,<br>
><br>
> I just upgraded from 4.0.6 to 4.2.3 using the Debian packages.  During the<br>
> database upgrade, I received a few errors:<br>
<br>
</div>I'm guessing you set up a new machine, installed request-tracker4 from<br>
testing, restored your database and then did the upgrade?<br></blockquote><div><br></div></div><div>Actually this is on a system that was running 4.0.6 previously.  I just did apt-get install request-tracker4 (using the testing repository) and it upgraded all the packages. </div>
<div class="">
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
You have an unclean database with 4.2 tables in it, and you're<br>
tripping over some of the code we added to help RT handle that more<br>
gracefully.<br></blockquote><div><br></div></div><div>What I'm wondering is how I can tell if the database is "unclean" or if it's okay.  The "upgrade history" section in System Configuration shows that it did "Upgrade from 4.0.19 to 4.2.3" once without errors, and then it did it again and it says "(Incomplete)".  Maybe that doesn't actually mean it tried twice though, I'm not sure.</div>
<div class="">
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
I've pushed<br>
<a href="https://github.com/bestpractical/rt/commit/0ac64855f479b4133f4fe838af6b8b2dec8f5d18.patch" target="_blank">https://github.com/bestpractical/rt/commit/0ac64855f479b4133f4fe838af6b8b2dec8f5d18.patch</a><br>
and it should be in 4.2.5.  You may be able to apply the patch<br>
manually to /usr/share/request-tracker4/etc/upgrade/4.1.1/schema.Pg<br>
or just clean out your DB by hand before letting the debian upgrade<br>
scripts go.<br></blockquote><div><br></div></div><div>Can I safely just drop  the table, drop the sequence, create the sequence, and create the table?  I won't lose anything critical by doing that?</div><div><br></div>
<div>
I'm guessing there's a bunch of stuff it was supposed to do after that, but it probably stopped at that point.  I'm just thrown off by it being in the "upgrade history" twice, the first time it looks like it did a whole bunch of stuff successfully, including this step and lot after this step.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5">-kevin<br>
<div><div><br>
>  Processing 4.1.1<br>
><br>
> Now populating database schema.<br>
><br>
> [12453] [Wed May 21 03:19:36 2014] [critical]: DBD::Pg::st execute failed:<br>
> ERROR:  cannot drop sequence objectscrips_id_seq because other objects<br>
> depend on it<br>
><br>
> DETAIL:  default for table objectscrips column id depends on sequence<br>
> objectscrips_id_seq<br>
><br>
> HINT:  Use DROP ... CASCADE to drop the dependent objects too. at<br>
> /usr/share/request-tracker4/lib/RT/Handle.pm line 529.<br>
> (/usr/share/request-tracker4/lib/RT.pm:394)<br>
><br>
> DBD::Pg::st execute failed: ERROR:  cannot drop sequence<br>
> objectscrips_id_seq because other objects depend on it<br>
><br>
> DETAIL:  default for table objectscrips column id depends on sequence<br>
> objectscrips_id_seq<br>
><br>
> HINT:  Use DROP ... CASCADE to drop the dependent objects too. at<br>
> /usr/share/request-tracker4/lib/RT/Handle.pm line 529.<br>
><br>
> error encountered processing<br>
> /usr/share/dbconfig-common/scripts/request-tracker4/upgrade/pgsql/4.2.3:<br>
><br>
> /usr/share/dbconfig-common/scripts/request-tracker4/upgrade/pgsql/4.2.3<br>
> exited with non-zero status<br>
><br>
><br>
> There could be an issue with the Debian packages (they are still in the<br>
> testing branch), but I'm trying to figure out what state the database is in<br>
> now.  The system is working fine, and shows version 4.2.3.  If I navigate<br>
> to Admin -> Tools -> System Configuration, then in the "RT Upgrade History"<br>
> section it looks like it might have tried to upgrade the database twice,<br>
> and the second time it failed (understandably).<br>
><br>
><br>
> Is there a way I can verify that the database schema is completely up to<br>
> date?<br>
><br>
><br>
> Here is what the "RT Upgrade History" section shows: (Sorry for the HTML,<br>
> wasn't sure how else to show it)<br>
> RT (Current version: 4.2.3) ActionDateElapsedRT VersionInsert from<br>
</div></div>> /usr/share/request-tracker4/etc/upgrade/4.0.9/contentTue May 20 23:17:45<br>
> 20141 second4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.0.18/contentTue May 20 23:17:53<br>
> 20141 second4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.0.19/contentTue May 20 23:17:55<br>
> 20140 seconds4.2.3 <<a href="http://rt/Admin/Tools/Configuration.html#" target="_blank">http://rt/Admin/Tools/Configuration.html#</a>>Upgrade from<br>
> 4.0.19 to 4.2.3Tue May 20 23:17:56 20142 minutes4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.0.9/contentTue May 20 23:19:29<br>
> 20140 seconds4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.0.18/contentTue May 20 23:19:34<br>
> 20140 seconds4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.0.19/contentTue May 20 23:19:35<br>
> 20140 seconds4.2.3 <<a href="http://rt/Admin/Tools/Configuration.html#" target="_blank">http://rt/Admin/Tools/Configuration.html#</a>>Upgrade from<br>
> 4.0.19 to 4.2.3 (Incomplete)Tue May 20 23:19:36 20144.2.3Upgrade from<br>
> 4.0.19 to 4.1.0Tue May 20 23:19:36 20140 seconds4.2.3Insert from<br>
> /usr/share/request-tracker4/etc/upgrade/4.1.0/contentTue May 20 23:19:36<br>
> 20140 seconds4.2.3Upgrade from 4.1.0 to 4.1.1 (Incomplete)Tue May 20<br>
> 23:19:36 20144.2.3Schema updates from<br>
> /usr/share/request-tracker4/etc/upgrade/4.1.1 (Incomplete)Tue May 20<br>
> 23:19:36 20144.2.3<br>
> Thanks,<br>
> Nate<br>
<br>
<br></div></div>--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></blockquote></div><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Nate</div></div>
</blockquote></div><br></div></div></div>