| from __future__ import annotations | |
| from pathlib import Path | |
| def test_phase_1_3_manual_migration_has_no_null_bytes() -> None: | |
| migration = Path(__file__).resolve().parents[1] / "migrations" / "phase_1_3_manual.sql" | |
| assert b"\x00" not in migration.read_bytes() | |
| def test_phase_1_3_manual_migration_uses_postgres_boolean_default() -> None: | |
| migration = Path(__file__).resolve().parents[1] / "migrations" / "phase_1_3_manual.sql" | |
| sql = migration.read_text(encoding="utf-8") | |
| assert "official_source BOOLEAN NOT NULL DEFAULT FALSE" in sql | |
| assert "DEFAULT 0" not in sql | |