fix table with handling, icons implemented
This commit is contained in:
@@ -88,6 +88,8 @@ ASSET_COLUMNS = {
|
||||
"room_number": "VARCHAR(80) NULL",
|
||||
"parent_asset_id": "INTEGER NULL REFERENCES assets(id) ON DELETE SET NULL",
|
||||
"mesh_mtype": "INTEGER NULL",
|
||||
"mesh_icon": "INTEGER NULL",
|
||||
"visual_source": "VARCHAR(24) NOT NULL DEFAULT 'auto'",
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +108,7 @@ def apply_lightweight_migrations() -> None:
|
||||
connection.execute(text("CREATE INDEX IF NOT EXISTS ix_assets_room_number ON assets (room_number)"))
|
||||
connection.execute(text("CREATE INDEX IF NOT EXISTS ix_assets_parent_asset_id ON assets (parent_asset_id)"))
|
||||
connection.execute(text("CREATE INDEX IF NOT EXISTS ix_assets_mesh_mtype ON assets (mesh_mtype)"))
|
||||
connection.execute(text("CREATE INDEX IF NOT EXISTS ix_assets_mesh_icon ON assets (mesh_icon)"))
|
||||
inspector = inspect(engine)
|
||||
with engine.begin() as connection:
|
||||
if "users" in inspector.get_table_names():
|
||||
|
||||
Reference in New Issue
Block a user