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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user