load_or_create_session_key. Internal helper function. This docstring was added automatically to improve maintainability. Returns: Varies.
()
| 1145 | ) |
| 1146 | """) |
| 1147 | cur.execute("CREATE INDEX IF NOT EXISTS idx_file_shares_owner_path ON file_shares(owner, relpath)") |
| 1148 | |
| 1149 | cur.execute(""" |
| 1150 | CREATE TABLE IF NOT EXISTS file_activity ( |
| 1151 | id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 1152 | owner TEXT NOT NULL, |
| 1153 | actor TEXT NOT NULL, |
| 1154 | action TEXT NOT NULL, |
| 1155 | relpath TEXT NOT NULL, |
| 1156 | detail TEXT, |
| 1157 | created_at TEXT NOT NULL |
| 1158 | ) |
| 1159 | """) |
| 1160 | cur.execute("CREATE INDEX IF NOT EXISTS idx_file_activity_owner_id ON file_activity(owner, id DESC)") |
| 1161 | conn.commit() |
| 1162 | conn.close() |
| 1163 | |
| 1164 | db_init() |
| 1165 | |
| 1166 | |
| 1167 | # --------------------------- |
| 1168 | # Appearance preference helpers |
| 1169 | # --------------------------- |
| 1170 |