only add new disableRichEdit field if it's not already there.
This commit is contained in:
parent
fb066d9a9a
commit
efc30f6fcb
1 changed files with 5 additions and 1 deletions
|
|
@ -755,7 +755,11 @@ sub removeFiles {
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub addDisabletoRichEditor {
|
sub addDisabletoRichEditor {
|
||||||
print "\tUpdating Rich Editor to add master disable.\n" unless ($quiet);
|
print "\tUpdating Rich Editor to add master disable.\n" unless ($quiet);
|
||||||
$session->db->write("alter table RichEdit add column disableRichEditor int(11) default '0'");
|
my $sth = $session->db->read('show columns from RichEdit');
|
||||||
|
my $numColumns = $sth->rows;
|
||||||
|
$sth->finish;
|
||||||
|
# only add the column if it doesn't already exist.
|
||||||
|
$session->db->write("alter table RichEdit add column disableRichEditor int(11) default 0") if ($numColumns < 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue