{"id":15187447,"url":"https://github.com/fontseca/noda-database","last_synced_at":"2026-03-02T18:08:38.610Z","repository":{"id":250496659,"uuid":"795575646","full_name":"fontseca/noda-database","owner":"fontseca","description":"The PostgreSQL database repository for the NODA project.","archived":false,"fork":false,"pushed_at":"2024-08-06T13:54:28.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T22:35:56.191Z","etag":null,"topics":["database","plpgsql","postgres","postgresql","task-manager"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fontseca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-03T15:19:07.000Z","updated_at":"2024-08-06T13:54:32.000Z","dependencies_parsed_at":"2024-11-11T05:01:01.975Z","dependency_job_id":"99151afa-582b-43d2-b407-36826302fcbf","html_url":"https://github.com/fontseca/noda-database","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"d08c5756c3feaaaa243e44080406c18530daaec6"},"previous_names":["fontseca/noda-database"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fontseca%2Fnoda-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fontseca%2Fnoda-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fontseca%2Fnoda-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fontseca%2Fnoda-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fontseca","download_url":"https://codeload.github.com/fontseca/noda-database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240816476,"owners_count":19862294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["database","plpgsql","postgres","postgresql","task-manager"],"created_at":"2024-09-27T18:22:36.321Z","updated_at":"2026-03-02T18:08:38.572Z","avatar_url":"https://github.com/fontseca.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" alt=\"drawing\" style=\"width:400px;\"/\u003e\n\n---\n  \u003cimg src=\"https://img.shields.io/badge/postgresql-4169e1?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white\" height=\"20\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/fontseca/noda-database\" /\u003e\n\u003c/div\u003e\n\n**NODA** is a task management RESTful API designed to simplify the process of managing tasks, lists, and user\ninteractions. This is the PostgreSQL database repository for the **NODA** project.\n\n![database diagram](./diagram_v1.svg)\n*Entity–relationship model for the **NODA** database (designed with [Vertabelo](https://vertabelo.com/)).*\n\n## Installation\n\nFor installing the database, follow the instructions\nprovided [here](https://github.com/fontseca/noda-tasks-management-tool-api?tab=readme-ov-file#installation).\n\n## Project structure\n\nEach directory represents the name of a database schema; inside each of them you can expect at least one of the\nfollowing directories:\n\n- **enums**: definition of [enumerated types](https://www.postgresql.org/docs/current/datatype-enum.html)\n- **domains**: definition of [domain types](https://www.postgresql.org/docs/current/domains.html)\n- **composites**: definition of [composite types](https://www.postgresql.org/docs/current/rowtypes.html)\n- **tables**: definition of schema tables\n- **functions**: definition schema of functions\n- **procedures**: definition schema of procedures\n- **seeds**: necessary seed data for the schema\n\n### The `bootstrap.sh` file\n\nThe order of execution of all these files is determined in the `bootstrap.sh` script.\n\nUse the `bootstrap.sh` to automatically re-create the database in your running `noda_database` container. To do so, use\nthe following command:\n\n```shell\ndocker exec -it noda_database sh -c '$PROJECT_DIR/bootstrap.sh'\n```\n\n\u003e **Note:**  `bootstrap.sh` is also an utility that helps to re-creating the database for any other host.\n\nEvery SQL sentence that is executed is wrapped by a transaction.\n\n### The `init.sql` file\n\nThis file contains the basic database initialization commands. This file is not executed by the `bootstrap.sh` utility\nsince by the time the script is run, the database is expected to be already created.\n\nThe file is executed as an initialization script when the container is being created by Docker Compose.\n\n### The `schemas.sql` file\n\nThis file contains the commands for creating the database schemas and installing the necessary extensions. It is the\nfirst file to be executed in `boostrap.sh`.\n\n## Cluster information\n\nInside the running Docker container (`noda_database`), the Postgres server is running on the default port (`5432`), but\nfor outside users, the cluster is available through the address: `0.0.0.0:7891`.\n\nThe `postgres` superuser is not used as the owner of the database and schema objects, instead I use the `worker` role\ndefined in the `init.sql` file.\n\nThe actual database is called `master` and its owned by the `worker` role.\n\nThe password for the `worker` role is `secret`.\n\n### In a nutshell\n\n* PostgreSQL server port: `7891`\n* Database name: `master`\n* Database owner: `worker`\n* Role password: `secret`\n\n## Database access\n\nOnce the Docker container is up and running, you can access the PostgreSQL database with this command:\n\n```shell\ndocker exec -it noda_database psql -U worker -d master\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffontseca%2Fnoda-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffontseca%2Fnoda-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffontseca%2Fnoda-database/lists"}