mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Geometry: Prepare update db 0.1.0.
This commit is contained in:
1 parent
9deccb465e
commit
1bae755f1c
4 files changed
+107
-58
No files matched your search
@@ -45,7 +45,7 @@ class Stricklers(SQLSubModel):
|
||||
def _db_create(cls, execute, ext=""):
|
||||
execute(f"""
|
||||
CREATE TABLE stricklers{ext} (
|
||||
{cls.create_db_add_pamhyr_id()}
|
||||
{cls.create_db_add_pamhyr_id()},
|
||||
name TEXT,
|
||||
comment TEXT,
|
||||
minor REAL NOT NULL,
|
||||
@@ -120,7 +120,7 @@ class Stricklers(SQLSubModel):
|
||||
return stricklers
|
||||
|
||||
def _db_save(self, execute, data=None):
|
||||
sql = (
|
||||
execute(
|
||||
"INSERT INTO " +
|
||||
"stricklers(pamhyr_id, name, comment, minor, medium) " +
|
||||
"VALUES (" +
|
||||
@@ -130,7 +130,6 @@ class Stricklers(SQLSubModel):
|
||||
f"{float(self.minor)}, {float(self.medium)}" +
|
||||
")"
|
||||
)
|
||||
execute(sql)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in new issue
Block a user