summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 93fc381)
raw | patch | inline | side by side (parent: 93fc381)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 14:17:24 +0000 (14:17 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 14:17:24 +0000 (14:17 +0000) |
Drop table if exists for create_table
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10481 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10481 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/DBsqlite.pm | patch | blob | history |
index cf53043a0d5bdb279bc0fd5fc3ee5728a74e59a2..09ef7404a2d0bf52ed7a4ddcdbc947cba4d86e98 100644 (file)
$col_names->{ $table_name } = $col_names_ref;
my $col_names_string = join("', '", @col_names);
- my $sql_statement = "CREATE TABLE IF NOT EXISTS $table_name ( '$col_names_string' )";
+ my $sql_statement = "CREATE TABLE $table_name ( '$col_names_string' )";
+ $self->{dbh}->do("DROP TABLE IF EXISTS $table_name");
$self->{dbh}->do($sql_statement);
return 0;
}
my $sql_statement_drop = "DROP TABLE IF EXISTS $to";
my $sql_statement_alter = "ALTER TABLE $from RENAME TO $to";
+ $self->{dbh}->do($sql_statement_drop);
+ $self->{dbh}->do($sql_statement_alter);
return;
}