mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Add first stub for profile database
CURA-6096
This commit is contained in:
parent
0348293f87
commit
3f80fcb5e5
1 changed files with 26 additions and 0 deletions
|
@ -44,6 +44,32 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
# is added, we check to see if an extruder stack needs to be added.
|
||||
self.containerAdded.connect(self._onContainerAdded)
|
||||
|
||||
@override(ContainerRegistry)
|
||||
def _createDatabaseFile(self, db_path: str) -> None:
|
||||
connection = super()._createDatabaseFile(db_path)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("""
|
||||
CREATE TABLE qualities(
|
||||
id text,
|
||||
name text,
|
||||
quality_type text,
|
||||
material text,
|
||||
variant text,
|
||||
global_quality bool,
|
||||
definition text
|
||||
);
|
||||
CREATE UNIQUE INDEX idx_qualities_id on qualities (id);
|
||||
|
||||
CREATE TABLE variants(
|
||||
id text,
|
||||
name text,
|
||||
hardware_type text,
|
||||
definition text
|
||||
);
|
||||
CREATE UNIQUE INDEX idx_variants_id on variants (id);
|
||||
""")
|
||||
return connection
|
||||
|
||||
@override(ContainerRegistry)
|
||||
def addContainer(self, container: ContainerInterface) -> bool:
|
||||
"""Overridden from ContainerRegistry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue