Compare commits
1 Commits
2-mouselea
...
4-bigint-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
103432820a |
@@ -57,11 +57,11 @@ export function usePlot(
|
||||
|
||||
// Defer mouseleave — prevents React hydration events firing before lastIdxRef set
|
||||
requestAnimationFrame(() => {
|
||||
plot.over.onmouseleave = () => {
|
||||
plot.over.addEventListener('mouseleave', () => {
|
||||
const p = plotRef.current;
|
||||
if (!p) return;
|
||||
p.setCursor({ left: idxToPixel(p, lastIdxRef.current), top: -10 });
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
// deps is intentionally dynamic — passed by parent to allow external rebuild triggers
|
||||
|
||||
12
web/migrations/004_add_bigint_signals.js
Normal file
12
web/migrations/004_add_bigint_signals.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/** @type {import('node-pg-migrate').MigrationBuilder} */
|
||||
exports.up = (pgm) => {
|
||||
pgm.sql(`ALTER TABLE signals ALTER COLUMN green TYPE bigint`);
|
||||
pgm.sql(`ALTER TABLE signals ALTER COLUMN red TYPE bigint`);
|
||||
pgm.sql(`ALTER TABLE alerts ALTER COLUMN threshold TYPE bigint`);
|
||||
};
|
||||
|
||||
exports.down = (pgm) => {
|
||||
pgm.sql(`ALTER TABLE alerts ALTER COLUMN threshold TYPE integer`);
|
||||
pgm.sql(`ALTER TABLE signals ALTER COLUMN red TYPE integer`);
|
||||
pgm.sql(`ALTER TABLE signals ALTER COLUMN green TYPE integer`);
|
||||
};
|
||||
Reference in New Issue
Block a user