You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Arturo Perez <ap...@hayesinc.com> on 2007/02/23 19:43:04 UTC

messes up database

Hi all,

I went directly into the roller database and deleted some users (did NOT want them hanging around as they were a mistake).  Now I find that I get hibernate errors about missing rows.  Now, my stupidity aside, how can I deal with this?

Ideally, I'd like to save the existing blogs, save username & other user settings, drop the whole database and reload the blogs and users.
How close can I come to that?  Is there a documented procedure?

tia,
arturo


Re: messes up database

Posted by Dave <sn...@gmail.com>.
On 2/23/07, Arturo Perez <ap...@hayesinc.com> wrote:
> I went directly into the roller database and deleted some users (did NOT want them
> hanging around as they were a mistake).  Now I find that I get hibernate errors
> about missing rows. Now, my stupidity aside, how can I deal with this?

Oh my. You'll have to deal with this the same way you created the
problem -- with SQL fun. I guess there are two ways.

Either 1) recreate those users with the exact same ID numbers.

Or, 2) update all of the tables that point to those users and make
them point to other users -- i.e. those which you have not deleted.


> Ideally, I'd like to save the existing blogs, save username & other user settings,
> drop the whole database and reload the blogs and users. How close can I come
>  to that?  Is there a documented procedure?

I'm not sure exactly what you are trying to do, but I guess, if you
are using MySQL, you could use mysqldump to dump the database, then
use the mysql client to restore it layer. See the MySQL documentation
for details.

- Dave