fix(db): сохранить в Git исходные CRLF-байты миграций 0008–0013
Хеши в migration-manifest.ts закреплены за CRLF-байтами; в индексе были LF-блобы из main, и на чистом чекауте проверка манифеста не прошла бы. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d519b1734
commit
42f59f14bf
6 files changed
+26
-26
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
-- Захват перед POST и удержание неизвестных исходов. Исторические строки не меняются.
|
-- Захват перед POST и удержание неизвестных исходов. Исторические строки не меняются.
|
||||||
BEGIN;
|
BEGIN;
|
||||||
ALTER TABLE alert_outbox DROP CONSTRAINT IF EXISTS alert_outbox_status_check;
|
ALTER TABLE alert_outbox DROP CONSTRAINT IF EXISTS alert_outbox_status_check;
|
||||||
ALTER TABLE alert_outbox ADD CONSTRAINT alert_outbox_status_check
|
ALTER TABLE alert_outbox ADD CONSTRAINT alert_outbox_status_check
|
||||||
CHECK (status IN ('pending', 'processing', 'unknown', 'sent', 'failed'));
|
CHECK (status IN ('pending', 'processing', 'unknown', 'sent', 'failed'));
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
BEGIN;
|
BEGIN;
|
||||||
ALTER TABLE alert_outbox ADD COLUMN IF NOT EXISTS resolution_version integer NOT NULL DEFAULT 0;
|
ALTER TABLE alert_outbox ADD COLUMN IF NOT EXISTS resolution_version integer NOT NULL DEFAULT 0;
|
||||||
ALTER TABLE alert_outbox ADD CONSTRAINT alert_outbox_resolution_version_check CHECK (resolution_version >= 0);
|
ALTER TABLE alert_outbox ADD CONSTRAINT alert_outbox_resolution_version_check CHECK (resolution_version >= 0);
|
||||||
COMMIT;
|
COMMIT;
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
-- A failed command is an attempt, not a measured packet-loss percentage.
|
-- A failed command is an attempt, not a measured packet-loss percentage.
|
||||||
ALTER TABLE uptime_probe_samples ADD COLUMN IF NOT EXISTS measurement_known BOOLEAN NOT NULL DEFAULT true;
|
ALTER TABLE uptime_probe_samples ADD COLUMN IF NOT EXISTS measurement_known BOOLEAN NOT NULL DEFAULT true;
|
||||||
ALTER TABLE uptime_probe_samples ADD COLUMN IF NOT EXISTS observation_error TEXT;
|
ALTER TABLE uptime_probe_samples ADD COLUMN IF NOT EXISTS observation_error TEXT;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
CREATE TABLE IF NOT EXISTS traffic_collection_state (
|
CREATE TABLE IF NOT EXISTS traffic_collection_state (
|
||||||
server_id BIGINT PRIMARY KEY REFERENCES servers(id) ON DELETE CASCADE,
|
server_id BIGINT PRIMARY KEY REFERENCES servers(id) ON DELETE CASCADE,
|
||||||
server_updated_at TIMESTAMPTZ NOT NULL,
|
server_updated_at TIMESTAMPTZ NOT NULL,
|
||||||
last_attempt_at TIMESTAMPTZ NOT NULL,
|
last_attempt_at TIMESTAMPTZ NOT NULL,
|
||||||
last_succeeded_at TIMESTAMPTZ,
|
last_succeeded_at TIMESTAMPTZ,
|
||||||
status TEXT NOT NULL CHECK(status IN ('pending', 'ok', 'error')),
|
status TEXT NOT NULL CHECK(status IN ('pending', 'ok', 'error')),
|
||||||
error TEXT
|
error TEXT
|
||||||
);
|
);
|
||||||
@@ -1 +1 @@
|
|||||||
ALTER TABLE traffic_samples ADD COLUMN IF NOT EXISTS native_counter_identity TEXT;
|
ALTER TABLE traffic_samples ADD COLUMN IF NOT EXISTS native_counter_identity TEXT;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
-- Retention runs after each scheduler receipt; avoid scanning the complete history.
|
-- Retention runs after each scheduler receipt; avoid scanning the complete history.
|
||||||
-- On a busy existing installation, pre-create this same index CONCURRENTLY
|
-- On a busy existing installation, pre-create this same index CONCURRENTLY
|
||||||
-- outside a transaction before deploying (deploy/PRODUCTION-RETENTION-INDEX.md).
|
-- outside a transaction before deploying (deploy/PRODUCTION-RETENTION-INDEX.md).
|
||||||
CREATE INDEX IF NOT EXISTS idx_scheduler_runs_finished_at ON scheduler_runs (finished_at);
|
CREATE INDEX IF NOT EXISTS idx_scheduler_runs_finished_at ON scheduler_runs (finished_at);
|
||||||
Reference in new issue
Block a user