File size: 584 Bytes
7ca0188
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
"""Initialize the optional Neon analytics schema."""
import sys
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:sys.path.insert(0,str(ROOT))
from src.logging_layer.neon_client import NeonClient  # noqa:E402
def main()->int:
    client=NeonClient()
    if not client.is_configured():print("Neon is not configured. Set the DATABASE_URL secret.");return 0
    ok=client.execute_schema();print("Neon schema initialized." if ok else "Neon schema initialization failed.");return 0 if ok else 1
if __name__=="__main__":raise SystemExit(main())