Restore
Restore
Restore file to captured state
Every captured change carries its SHA-256-addressed content in BLOB_STORE. Restoring writes that content back to the original path — current file gets backed up to <path>.drift_restore_backup_<epoch> before overwrite.
What will change
Preview -- nothing has been written yet.
| Target file | /var/www/vhosts/3dshawn.com/site1/TEMPLATES/schema_changes.html |
| Site | DriftSense self-monitor on local |
| Kind | local |
| Captured at | 2026-07-10 22:19:13 |
| Captured SHA | a557ada4dbf65844457dc8cb6e2960bdf3b4a57036420f69c8986c0e0ad566c0 |
Current state on disk
Live check just now. If SHAs match, the restore is a no-op.
| File present | yes |
| Size | 2912 bytes |
| Current SHA | e44d80f7076d |
| Same as captured? | no -- restore will change it |
What restore will change — live diff
Left column shows current on-disk content; right shows what restore will write. +15 additions, -10 deletions, 41 unchanged context lines.
| 1 | 1 | <div class="page-head"> |
| 2 | 2 | <span class="page-eyebrow"><span class="dot"></span> Monitor</span> |
| 3 | 3 | <h1 class="page-title">Schema changes</h1> |
| 4 | 4 | <p class="page-subtitle">Every DDL change captured across every monitored database. Someone ALTERs a column? It shows up here whether they told you or not.</p> |
| 5 | 5 | </div> |
| 6 | ||
| 7 | $picker_html | |
| 8 | 6 | |
| 9 | <form method="get" action="/schema_changes.cgi" style="display:flex;gap:8px;align-items:center;margin-bottom:16px"> | |
| 10 | <span class="rb-label" style="font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--text-muted);font-weight:700">Table filter</span> | |
| 11 | <input type="text" name="q" value="$q" placeholder="db or table name substring" style="flex:1;background:var(--bg-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:6px 12px;font-size:12.5px;font-family:inherit"> | |
| 12 | <button type="submit" class="tr-chip is-active" style="border:none">Apply</button> | |
| 13 | [if:$q]<a class="tr-chip" href="/schema_changes.cgi">Clear</a>[/if] | |
| 7 | <form method="get" action="/schema_changes.cgi" style="display:flex;gap:10px;align-items:center;padding:12px 14px;background:var(--bg-2);border:1px solid var(--border);border-radius:12px;margin-bottom:16px"> | |
| 8 | <span class="dim mono" style="font-size:11px;letter-spacing:1.4px;text-transform:uppercase">Range</span> | |
| 9 | <select name="days" onchange="this.form.submit()"> | |
| 10 | <option value="1">Last 24h</option> | |
| 11 | <option value="7">Last 7 days</option> | |
| 12 | <option value="30" selected>Last 30 days</option> | |
| 13 | <option value="90">Last 90 days</option> | |
| 14 | <option value="365">Last year</option> | |
| 15 | </select> | |
| 16 | <input type="text" name="q" value="$q" placeholder="db or table name filter" style="flex:1"> | |
| 17 | <button type="submit" class="btn">Filter</button> | |
| 18 | <span style="margin-left:auto" class="dim">$total results</span> | |
| 14 | 19 | </form> |
| 15 | 20 | |
| 16 | 21 | <div class="module glow-amber"> |
| 17 | 22 | <div class="module-head"><div class="left"> |
| 18 | 23 | <div class="module-icon"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v6c0 1.7 4 3 9 3s9-1.3 9-3V5"/></svg></div> |
| 19 | 24 | <div class="module-title">DDL diffs</div> |
| 20 | <span class="module-subtitle">Each row shows what the schema looked like before and after. Click to see the full unified diff of column adds, drops, and alters. $total match this window.</span> | |
| 25 | <span class="module-subtitle">Each row shows what the schema looked like before and after. Click to see the full unified diff of column adds, drops, and alters.</span> | |
| 21 | 26 | </div></div> |
| 22 | 27 | <div class="module-body tight"> |
| 23 | 28 | [if:$has_rows] |
| 24 | 29 | <table class="tbl"> |
| 25 | 30 | <thead><tr> |
| 26 | 31 | <th style="width:220px">Database.Table</th> |
| 27 | 32 | <th>Change</th> |
| 28 | 33 | <th style="width:110px">30-day rhythm</th> |
| 29 | 34 | <th style="width:110px">Server</th> |
| 30 | 35 | <th style="width:180px">When</th> |
| 31 | 36 | </tr></thead> |
| 32 | 37 | <tbody> |
| 33 | 38 | [loop:@rows] |
| 34 | 39 | <tr> |
| 35 | 40 | <td class="mono"><a href="$diff_url" style="color:var(--accent-hi);text-decoration:none"><strong>$database_name</strong>.<span class="dim">$table_name</span></a></td> |
| 36 | 41 | <td class="mono dim" style="font-size:12px"><a href="$diff_url" style="color:inherit;text-decoration:none">$changes_preview</a></td> |
| 37 | 42 | <td>$sparkline_svg</td> |
| 38 | 43 | <td class="dim">$server_name</td> |
| 39 | <td class="mono dim"><span class="ts" data-ts="$ts_epoch" data-fmt="datetime">$change_datetime</span></td> | |
| 44 | <td class="mono dim">$change_datetime</td> | |
| 40 | 45 | </tr> |
| 41 | 46 | [/loop] |
| 42 | 47 | </tbody> |
| 43 | 48 | </table> |
| 44 | 49 | [/if] |
| 45 | 50 | [if:!$has_rows] |
| 46 | 51 | <div style="padding:36px 14px;text-align:center;color:var(--text-dim);font-size:13.5px"> |
| 47 | No schema changes captured in this window. Try widening the range with the chips above, or configure a database monitor in <a href="[url:databases]" style="color:var(--accent-hi)">Databases</a>. | |
| 52 | No schema changes captured. Configure a database monitor in <a href="[url:databases]" style="color:var(--accent-hi)">Databases</a>. | |
| 48 | 53 | </div> |
| 49 | 54 | [/if] |
| 50 | 55 | </div> |
| 51 | 56 | </div> |
Confirm restore
Backs current content to <target>.drift_restore_backup_<epoch>, writes the captured content, verifies SHA post-write.