Public | Automated Build

Last pushed: 6 months ago
Short Description
Common project setup database operations like migrations and seeding
Full Description

Shiphp Database Operations

This project provides support for common project setup database operations like migrations and seeding data using Phinx.

Technical information

  • Supports MySQL, MariaDB, or Postgres databases

Setup (for dev/testing)

  • Install composer dependencies: docker run --rm -v $(pwd):/app composer/composer:1.0 install
  • Build the image: docker build . -t shiphp/shiphp-db-migrations:latest
  • Use this image in your projects to quickly set up a REST API using an existing database.

Usage Example

  • Generate a new migration class: docker run --rm -v $(pwd)/migrations:/app/migrations shiphp/shiphp-db-migrations php vendor/bin/phinx create MyNewMigration
  • Generate a new seed class: docker run --rm -v $(pwd)/migrations:/app/migrations shiphp/shiphp-db-migrations php vendor/bin/phinx create MyNewMigration

See the documentation at docs.phinx.org for how to use migration and seed classes.

Credits

Icon by Madebyoliver from www.flaticon.com is licensed by CC 3.0 BY.

Docker Pull Command
Owner
shiphp
Source Repository

Comments (0)