MCPcopy Create free account
hub / github.com/ceph/ceph / create_skeleton_schema

Method create_skeleton_schema

src/pybind/mgr/mgr_module.py:1239–1253  ·  view source on GitHub ↗
(self, db: sqlite3.Connection)

Source from the content-addressed store, hash-verified

1237 self.appify_pool(self.MGR_POOL_NAME, 'mgr')
1238
1239 def create_skeleton_schema(self, db: sqlite3.Connection) -> None:
1240 SQL = [
1241 """
1242 CREATE TABLE IF NOT EXISTS MgrModuleKV (
1243 key TEXT PRIMARY KEY,
1244 value NOT NULL
1245 ) WITHOUT ROWID;
1246 """,
1247 """
1248 INSERT OR IGNORE INTO MgrModuleKV (key, value) VALUES ('__version', 0);
1249 """,
1250 ]
1251
1252 for sql in SQL:
1253 db.execute(sql)
1254
1255 def update_schema_version(self, db: sqlite3.Connection, version: int) -> None:
1256 SQL = "UPDATE OR ROLLBACK MgrModuleKV SET value = ? WHERE key = '__version';"

Callers 1

load_schemaMethod · 0.95

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected