glider88/fixturization

Create fixtures from database

dev-main 2025-02-22 16:06 UTC

This package is auto-updated.

Last update: 2025-05-22 19:32:08 UTC


README

Create database for dev from production or rc.

Installation:

composer require glider88/fixturization

Run example:

Get example data:

wget https://raw.githubusercontent.com/devrimgunduz/pagila/refs/heads/master/pagila-schema.sql -P .docker/postgres
wget https://raw.githubusercontent.com/devrimgunduz/pagila/refs/heads/master/pagila-data.sql -P .docker/postgres

Fix owner:

sed -i -e 's/OWNER TO postgres/OWNER TO fixturization/g' .docker/postgres/pagila-schema.sql

Start docker:

bin/up

Generate schema from database:

bin/sh php examples/schema.php psql

Generate dump (sql and yaml formats):

bin/sh php examples/crawler.php sql yaml