kodexa 7.4.412416252968__py3-none-any.whl → 7.4.412416544440__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kodexa/model/persistence.py +5 -5
- {kodexa-7.4.412416252968.dist-info → kodexa-7.4.412416544440.dist-info}/METADATA +1 -1
- {kodexa-7.4.412416252968.dist-info → kodexa-7.4.412416544440.dist-info}/RECORD +5 -5
- {kodexa-7.4.412416252968.dist-info → kodexa-7.4.412416544440.dist-info}/LICENSE +0 -0
- {kodexa-7.4.412416252968.dist-info → kodexa-7.4.412416544440.dist-info}/WHEEL +0 -0
kodexa/model/persistence.py
CHANGED
@@ -1243,18 +1243,18 @@ class SqliteDocumentPersistence(object):
|
|
1243
1243
|
Ensure the 'ed' table exists in the database.
|
1244
1244
|
Creates the table if it does not exist.
|
1245
1245
|
"""
|
1246
|
-
# First check if the old table exists and has
|
1246
|
+
# First check if the old table exists and has key column
|
1247
1247
|
old_table = self.cursor.execute("""
|
1248
1248
|
SELECT name FROM sqlite_master
|
1249
1249
|
WHERE type='table' AND name='ed'
|
1250
1250
|
""").fetchone()
|
1251
1251
|
|
1252
1252
|
if old_table:
|
1253
|
-
# Check if table has
|
1253
|
+
# Check if table has key column
|
1254
1254
|
table_info = self.cursor.execute("PRAGMA table_info(ed)").fetchall()
|
1255
|
-
|
1255
|
+
has_key_column = any(col[1] == 'key' for col in table_info)
|
1256
1256
|
|
1257
|
-
if
|
1257
|
+
if not has_key_column:
|
1258
1258
|
# Get the old data and drop the table
|
1259
1259
|
data = self.cursor.execute("SELECT obj FROM ed").fetchone()
|
1260
1260
|
self.cursor.execute("DROP TABLE ed")
|
@@ -1272,7 +1272,7 @@ class SqliteDocumentPersistence(object):
|
|
1272
1272
|
self.cursor.execute("INSERT INTO ed (key, obj) VALUES (?, ?)",
|
1273
1273
|
["default", data[0]])
|
1274
1274
|
else:
|
1275
|
-
# Table exists
|
1275
|
+
# Table exists and has key column - do nothing
|
1276
1276
|
return
|
1277
1277
|
else:
|
1278
1278
|
# Create new table if it doesn't exist
|
@@ -13,7 +13,7 @@ kodexa/model/entities/product.py,sha256=ZDpHuBE_9FJ-klnkyBvTfPwYOqBkM1wraZMtHqNA
|
|
13
13
|
kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
|
14
14
|
kodexa/model/model.py,sha256=qh1YUew3UgtjU0t4fAwSXYYuzQjXTOZWZkafyFp_w8M,118801
|
15
15
|
kodexa/model/objects.py,sha256=4Oyjs6omlHfwziAK1m2tFk4jSnzN7lFdXACog07ed1c,185124
|
16
|
-
kodexa/model/persistence.py,sha256=
|
16
|
+
kodexa/model/persistence.py,sha256=HX_uIkGs8bqHwqyE5wB2qMlGIG5ZnjuTu7xMdvKhEzA,72033
|
17
17
|
kodexa/model/utils.py,sha256=6R-3rFiW9irBwj0Mq5yhp7EDXkNUFaeFhr3bWmnlW4g,2961
|
18
18
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
19
19
|
kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
|
@@ -43,7 +43,7 @@ kodexa/testing/test_utils.py,sha256=v44p__gE7ia67W7WeHN2HBFCWSCUrCZt7G4xBNCmwf8,
|
|
43
43
|
kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
|
44
44
|
kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
45
45
|
kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
|
46
|
-
kodexa-7.4.
|
47
|
-
kodexa-7.4.
|
48
|
-
kodexa-7.4.
|
49
|
-
kodexa-7.4.
|
46
|
+
kodexa-7.4.412416544440.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
47
|
+
kodexa-7.4.412416544440.dist-info/METADATA,sha256=VeiELYv8_qjOKHQV3tNgdcJFsa6-FDSzJmsmr-HsjHA,3528
|
48
|
+
kodexa-7.4.412416544440.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
49
|
+
kodexa-7.4.412416544440.dist-info/RECORD,,
|
File without changes
|
File without changes
|