Entropy/etpDatabase:

- change dumped sql table creation schema from 'CREATE TABLE' to 'CREATE TABLE IF NOT EXISTS'


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1928 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-05-12 14:15:10 +00:00
parent ffdc38e0da
commit 7b68c292f5
3 changed files with 6 additions and 0 deletions
+3
View File
@@ -3234,6 +3234,9 @@ class etpDatabase:
elif name.startswith("sqlite_"):
continue
else:
t_cmd = "CREATE TABLE"
if sql.startswith(t_cmd):
sql = "CREATE TABLE IF NOT EXISTS"+sql[len(t_cmd):]
dumpfile.write("%s;\n" % sql)
self.cursor.execute("PRAGMA table_info('%s')" % name)