From 66b95816b21c3b4ba8a9b2e96986d95ad0999f87 Mon Sep 17 00:00:00 2001 From: Jamie McCarthy Date: Wed, 10 Mar 2004 19:27:50 +0000 Subject: [PATCH] The site's admin account isn't limited to 8 chars. Also, don't try to apply foreign key constraints while data is being inserted. --- bin/install-slashsite | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/install-slashsite b/bin/install-slashsite index 8b08aa469..fa8932a58 100755 --- a/bin/install-slashsite +++ b/bin/install-slashsite @@ -296,9 +296,7 @@ your Slash directories). [Y] "; unless ($opts{'a'}) { - print " -Create a name for the site's admin account (8 characters -or less). [$owner] "; + print "Create a name for the site's admin account. [$owner] "; chomp($username = ); $username ||= $owner; } else { @@ -382,6 +380,14 @@ while (<$dump>) { } close $dump; + +# We start this whole process by turning off foreign key +# constraints -- since we will be adding data in an order +# not guaranteed to match those constraints. When all +# the data is inserted, we can turn them back on. +unshift @sql, 'SET FOREIGN_KEY_CHECKS = 0'; +push @sql, 'SET FOREIGN_KEY_CHECKS = 1'; + for my $cmd (@sql) { next unless $cmd; my $rows_affected = $dbh->do($cmd);