{"id":31809862,"url":"https://github.com/thecoder507/lpf-database","last_synced_at":"2026-02-17T06:31:35.847Z","repository":{"id":316458474,"uuid":"1062803601","full_name":"thecoder507/lpf-database","owner":"thecoder507","description":"PostgreSQL database for Liga Panameña de Fútbol (LPF), including schema and sample data.","archived":false,"fork":false,"pushed_at":"2025-09-24T19:46:03.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-11T05:54:24.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecoder507.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-23T18:48:00.000Z","updated_at":"2025-09-24T19:46:06.000Z","dependencies_parsed_at":"2025-09-24T19:26:16.215Z","dependency_job_id":null,"html_url":"https://github.com/thecoder507/lpf-database","commit_stats":null,"previous_names":["thecoder507/lpf-database"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecoder507/lpf-database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecoder507%2Flpf-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecoder507%2Flpf-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecoder507%2Flpf-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecoder507%2Flpf-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecoder507","download_url":"https://codeload.github.com/thecoder507/lpf-database/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecoder507%2Flpf-database/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29535969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T05:53:00.802Z","updated_at":"2026-02-17T06:31:35.831Z","avatar_url":"https://github.com/thecoder507.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚽ LPF Database (Liga Panameña de Fútbol)\n\nPostgreSQL database for the Liga Panameña de Fútbol (LPF), with schema, Apertura 2024 sample data, and views for standings and match queries.\n\n---\n\n## 📌 Project Description\nThis project models the main entities of the LPF, such as:\n- Teams (equipos)\n- Matches (partidos)\n- Stadiums (estadios)\n- Conferences (conferencias)\n- Phases (fases)\n- Seasons (temporadas)\n- Tournaments (torneos)\n\nIt also includes constraints, indexes, and roles for better performance and security.\n\n---\n\n## 🗂️ Database Schema (ERD)\n![LPF ERD](images/LPF_ERD.png)\n\n\n---\n\n## 📂 Database Contents\n\nThe `lpf_database.sql` export includes the following:\n\n### 🗄️ Tables\n- **equipos** → Teams information (name, city, stadium, conference, foundation date)  \n- **partidos** → Matches between teams (date, goals, stadium, phase, type of match)  \n- **estadios** → Stadium details (name, location, capacity)  \n- **fases** → Tournament phases (classification, repechaje, semifinal, final)  \n- **conferencias** → League conferences (East/West)  \n- **temporadas** → Seasons (year)  \n- **torneos** → Tournaments linked to seasons (Apertura, Clausura)  \n\n### 👀 Views\n- **goles_equipo_vista** → Goals scored/conceded per team  \n- **tabla_posiciones_vista** → Standings (points, wins, draws, losses, GD) by conference  \n- **partidos_info_vista** → Match details with teams, result, stadium, and phase  \n\n### 🔐 Constraints\n- Primary keys (`id` in each table)  \n- Foreign keys (relationships between equipos, conferencias, estadios, torneos, fases, partidos)  \n- Check constraints (e.g., no negative goals, local team ≠ visiting team)  \n- Unique constraints (unique team names, stadium names, season year, etc.)  \n\n### ⚡ Indexes\n- `equipos_nombre_idx` → quick search by team name  \n- `partidos_equipo_local_id_idx` → filter by home team  \n- `partidos_equipo_visitante_id_idx` → filter by away team  \n- `partidos_fase_id_idx` → filter by phase  \n- `partidos_jornada_idx` → filter by matchday  \n\n### 👥 Roles \u0026 Permissions\n- **readonly** → can only view data  \n- **readwrite** → can view, insert, update, and delete data  \n\n---\n\n## 🚀 How to Import\n\n1. Clone this repository or download the `.sql` file.  \n2. Create a new database in PostgreSQL (e.g., `lpf`).  \n3. Import the dump using `psql`:  \n\n```bash\npsql -U postgres -d lpf -f lpf_database.sql\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoder507%2Flpf-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecoder507%2Flpf-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoder507%2Flpf-database/lists"}