{"id":15480058,"url":"https://github.com/tyler36/ddev-db-init","last_synced_at":"2026-02-16T22:06:17.305Z","repository":{"id":37736485,"uuid":"506152413","full_name":"tyler36/ddev-db-init","owner":"tyler36","description":"Automatically run SQL-like files when initializing the DDEV database service","archived":false,"fork":false,"pushed_at":"2025-02-26T06:12:29.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T00:01:54.411Z","etag":null,"topics":["database","mysql","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyler36.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":"2022-06-22T07:59:34.000Z","updated_at":"2025-02-27T03:32:27.000Z","dependencies_parsed_at":"2024-10-02T04:40:33.439Z","dependency_job_id":"a67f522e-e64c-434b-bb92-bb63cc2525bb","html_url":"https://github.com/tyler36/ddev-db-init","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"ddev/ddev-addon-template","purl":"pkg:github/tyler36/ddev-db-init","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-db-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-db-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-db-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-db-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyler36","download_url":"https://codeload.github.com/tyler36/ddev-db-init/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-db-init/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29521206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T21:45:09.491Z","status":"ssl_error","status_checked_at":"2026-02-16T21:44:58.452Z","response_time":115,"last_error":"SSL_read: 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":["database","mysql","postgresql","sql"],"created_at":"2024-10-02T04:40:26.553Z","updated_at":"2026-02-16T22:06:17.257Z","avatar_url":"https://github.com/tyler36.png","language":"Shell","readme":"\n\u003e [!IMPORTANT]\n\u003e Unable to get MySql and MariaDB to work correctly.\n\u003e It is recommended to use hooks for consistency.\n\u003e\n\u003e ```yaml\n\u003e #.ddev/config.db-init.yaml\n\u003e\n\u003e hooks:\n\u003e   post-start:\n\u003e     - exec-host: ddev mysql -uroot -proot -hdb \u003c \"${DDEV_APP_ROOT}/.ddev/db-init/*.sql\"\n\u003e ```\n\n# tyler36/ddev-db-init \u003c!-- omit in toc --\u003e\n\n[![tests](https://github.com/tyler36/ddev-db-init/actions/workflows/tests.yml/badge.svg)](https://github.com/tyler36/ddev-db-init/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2026.svg)\n\n- [Introduction](#introduction)\n- [Getting Started](#getting-started)\n- [What does this add-on do and add?](#what-does-this-add-on-do-and-add)\n- [Guides](#guides)\n- [Reset the DDEV database service](#reset-the-ddev-database-service)\n- [Supported SQL-files](#supported-sql-files)\n  - [Postgres](#postgres)\n  - [MariaDB](#mariadb)\n  - [MySQL](#mysql)\n- [TODO](#todo)\n\n## Introduction\n\nThis add-on will automatically load SQL-like files into the DDEV database container when starting a project with no database initialized. See [offical Queues documentation](https://laravel.com/docs/9.x/queues) for more details.\n\nThis can be used to:\n\n- configure the database service\n- add additional databases\n- populate the database\n\nIn addition, this makes it easy to\n\n- reset the database service using `ddev export` and `ddev delete`\n- configure the database of a cloud service such as Gitpod\n\n## Getting Started\n\nThis add-on requires DDEV v1.19.3 or higher.\n\n- Install the DDEV db-init add-on:\n\n```shell\nddev get tyler36/ddev-db-init\nddev restart\n```\n\n## What does this add-on do and add?\n\n1. Checks to make sure the DDEV version is adequate.\n2. Adds `.ddev/docker-compose.db-init.yaml`, which mounts a ddev folder into the database container.\n\n## Guides\n\n## Reset the DDEV database service\n\n- Create a backup of the current database.\n\n```shell\nddev export-db --gzip=false -f db.sql\n```\n\n- Move the file into `.ddev/db-init`.\n\n```shell\nmv db.sql ./.ddev/db-init\n```\n\n- Destroy the DDEV database (you created a backup, didn't you?).\n\n```shell\nddev delete -Oy\n```\n\n- Recreate the DDEV services.\n\n```shell\nddev start\n```\n\n## Supported SQL-files\n\n### Postgres\n\n- *.sql\n- *.sql.gz\n- *.sh\n\nSee [Initialization Scripts](https://hub.docker.com/_/postgres) for further information.\n\n### MariaDB\n\n- *.sh,\n- *.sql\n- *.sql.gz\n- *.sql.xz\n- *.sql.zst\n\nSee [Initializing a fresh instance](https://hub.docker.com/_/mariadb) for further information.\n\n### MySQL\n\n- *.sh,\n- *.sql\n- *.sql.gz\n\nSee [Initializing a fresh instance](https://hub.docker.com/_/mysql) for further information.\n\n## TODO\n\n- [ ] Confirm MariaDb support\n- [ ] Confirm MySQL support\n\n**Contributed and maintained by [tyler36](https://github.com/tyler36)**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fddev-db-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyler36%2Fddev-db-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fddev-db-init/lists"}