|
From: Shane <sh...@lo...> - 2004-09-09 12:13:08
|
I've been messing with converting all my slashsites to section-topics.
I thought I'd point out a few differences that caused me a bit of pain
yesterday:
1. When you are converting a site, do _not_ forget about the upgrades
file. Infact, you may, depending on how you are doing the conversion,
need to split the upgrades file up in pieces because in the middle of
it is some perl code that is dependant on some of the updates in that
file. So be careful. If you are not convertDBto200406_render will die
in mid-conversion.
2. The schema for the stories table has majorly changed. Gone is
'writestatus' and 'displaystatus'. Now stories.primaryskid <1 == 'never
display' and stories.in_trash... well, pretty obvious there.
3.
[13:54] <tf23> there may be a problem with the upgrades file with this
line
[13:54] <tf23> ALTER TABLE skins ADD COLUMN submittable ENUM('no',
'yes') DEFAULT 'yes' NOT NULL AFTER issue;
[13:55] <tf23> i'm seeing that submittable column already exists
[13:58] <jamie> where was it created?
[14:01] <tf23> good question. give me a bit, i'll find it
[14:03] <tf23> it's created when convertDBto200406 is run
I don't know that that's a bug, for sure. I haven't had time to mess
with it and rinse-and-repeat. If I find that it's not my own mistake
then I'll file a sf.bug for it.
4. typical/example code for judging which skin/section your code is
being run under:
my $skin_name = $form->{section};
my $skid = $skin_name
? $slashdb->getSkidFromName($skin_name)
: determineCurrentSkin();
setCurrentSkin($skid);
my $gSkin = getCurrentSkin();
$skin_name = $gSkin->{name};
$form->{section} = $skin_name;
$form->{skin_name} = $skin_name;
$form->{skid} = $skid;
That's it for now.
Shane
|