Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

slash1toslash2 and Repeat Story Bug

posted by pudge on 10:52 AM March 21st, 2001   Printer-friendly   Email story
We have this SQL in slash1toslash2:

    DROP TABLE newstories;
    CREATE TABLE newstories SELECT * FROM stories;

But that does not copy the primary key, so when we replace into newstories later, it just adds the story instead of replacing it. So after running slash1toslash2, run this line:

    ALTER TABLE newstories ADD PRIMARY KEY (sid);

Note that if you have duplicate stories already in newstories, run the two lines at the top again, then run the ALTER line.

Later today, this fix should be in the slash1toslash2 on CVS.

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • I've been running a Bender site, and I don't *really* need all the data, but I'd like to not have to copy it over myself. Is there/will there be a utility to update from previous versions of Bender to 2.0? I know I did a diff of my install's DB structure and the latest CVS awhile ago, and there were a few differences I didn't know how to account for.
  • There is no plan for that, no. We just don't have the time for it, and noted that we would not support previous betas. We only have time to support upgrades between actual releases.

    There are two primary issues with data, I think: making sure your schema is updated, and making sure your data is updated. As for the latter, the issue is mainly in making sure your templates are updated; you can use template-check and template-tool for that. For the schema, I would just diff the schema you have against the 2.0.0-pre1 schema, and make appropriate changes with ALTER TABLE etc.