Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Lightweight php migration tool for PostgreSQL databases

License

Notifications You must be signed in to change notification settings

LudwigSo/postgres-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres-migration

Lightweight php migration tool for PostgreSQL databases.

Getting Started

Prerequisites

To use this tool you need to have installed:

Php 7.1+
PostgreSQL 9.6+

Details: composer.json

Installing

composer require ludwig-br/postgres-migration

After downloading (with composer or manually) you need to do configuration. Every part you may need to touch is marked with a "ToDo"-statement.

  • copy the content of the example/ directory into your project
.../my_project/database/migrations/

After finishing the configuration you should get a security copy of you database.

https://www.postgresql.org/docs/current/static/backup.html

Finally you can generate your first migration files!

cd .../my_project/database/migration
php generate.php

The files will be placed in the directories specified in config/Directories.php for restoration or updating the database after small changes use

cd .../my_project/database/migration
php reload.php

Additional Information

This project is meant to offer an easy and lightweight way to integrate your (PostgreSQL) Database into your version control system. Furthermore minor changes to the database schema during developement can be applied easily. During generation your database will be altered, therefore please get a security copy before you use this tool. I advice using this tool only in a development environment.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Lightweight php migration tool for PostgreSQL databases

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages