a6c03a091e
Moved from gov-agreg/src/pages/achizitii/* to root (drop prefix). - 22 pages migrated, 127 files total - All internal links: /achizitii/X → /X (176 occurrences fixed) - AchizitiiLayout subnav rewritten: /X paths, top-right link to vreaudigital.ro hub - BaseLayout new (vreau.digital branding, OG tags, site URL) - astro.config.mjs: site https://vreau.digital, server output (was static) - docker-compose: port 5096 (vreaudigital is 5095), container vreau-digital - deploy.sh: paths /opt/vreau-digital, log /var/log/vreau-digital-deploy.log Backend shared with gov-agreg: - PostgreSQL satra (same schemas: seap, firms, anaf, anre, ...) - Photon, Martin tiles - Infisical /vreaudigital path (DATABASE_URL etc. shared) build: PASS (npx astro check 0 errors, npm run build 5s vite + 10s server)
33 lines
1.6 KiB
SQL
33 lines
1.6 KiB
SQL
-- 015_firms_onrc_extras.sql
|
|
-- Two additional ONRC bulk CSVs we weren't importing yet:
|
|
-- 1. od_reprezentanti_if.csv — administrators of "Întreprinderi Familiale"
|
|
-- (~80K rows). The persoană field plus locality+county of birth gives us
|
|
-- a separate small "owner registry" parallel to rep_legali on firms.entities.
|
|
-- 2. od_sucursale_alte_state_membre.csv — branches of RO companies registered
|
|
-- in other EU states (~tiny, ~hundreds of rows). Useful for follow-the-money
|
|
-- questions like "RO firm with EU branches winning EU-funded contracts".
|
|
--
|
|
-- Both are keyed by cod_inmatriculare which we already have on firms.entities,
|
|
-- so JOINs are trivial. Idempotent: TRUNCATE-and-reload on each ONRC snapshot.
|
|
|
|
CREATE TABLE IF NOT EXISTS firms.reprezentanti_if (
|
|
cod_inmatriculare text NOT NULL,
|
|
nume text,
|
|
data_nastere text, -- raw DD.MM.YYYY string from ONRC
|
|
localitate_nastere text,
|
|
judet_nastere text,
|
|
tara_nastere text,
|
|
calitate text
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_rep_if_cod ON firms.reprezentanti_if(cod_inmatriculare);
|
|
|
|
CREATE TABLE IF NOT EXISTS firms.sucursale_ue (
|
|
cod_inmatriculare text NOT NULL,
|
|
tip_unitate text, -- usually "Sucursală"
|
|
denumire_sucursala text,
|
|
euid text,
|
|
cod_fiscal_strain text, -- ONRC field is COD_FISCAL but it's the foreign one
|
|
tara text -- destination country
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_sucursale_ue_cod ON firms.sucursale_ue(cod_inmatriculare);
|