From: rettenbe Date: Mon, 6 Jul 2009 12:03:27 +0000 (+0000) Subject: bugfix: schema difference after installations are not considered X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6e6d9b358d26d80b49f097bdaac8a886a304b60b;p=gosa.git bugfix: schema difference after installations are not considered git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13890 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index 3fe6e0599..9f0b12b4a 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -163,6 +163,14 @@ sub check_schema { my $res = $self->exec_statement($sql); # [ ['0', 'id', 'INTEGER', '0', undef, '1' ], ['1', 'timestamp', 'VARCHAR(14)', '0', '\'none\'', '0'], ... ] my $db_table_length = @$res; + # Tabel does not exists, so no differences + if ($db_table_length == 0) + { + return 0; + } + + + # The number of columns is diffrent if ($col_names_length != $db_table_length) {