2017 © Pedro Peláez
 

library data

Dbmover plugin for explicitly running data modification statements after migration

image

dbmover/data

Dbmover plugin for explicitly running data modification statements after migration

  • Saturday, April 15, 2017
  • by monomelodies
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Dbmover\Data

DbMover plugin to execute data-altering statements (INSERT, UPDATE, DELETE) on migration., (*1)

Installation

$ composer require dbmover/data

Usage

For general DbMover usage, see dbmover/core., (*2)

This plugin extracts and executes all data-altering statements from your schema file. Typically, this will be the last plugin you'll want to add., (*3)

Example

Say you have a table foo in your schema, with many rows. You now add a table bar in a migration, and your application requires that it contains a row for each row in foo (perhaps you're doing a straight join in the new version somewhere). You could of course "remember" to perform that insert after migration, but that sucks (and people will forget)., (*4)

Or you could include something like this in your schema:, (*5)

``sql INSERT INTO bar (id, bar) SELECT id, foo FROM foo WHERE id NOT IN (SELECT id FROM bar); ```, (*6)

Contributing

See dbmover/core., (*7)

The Versions

15/04 2017

dev-master

9999999-dev

Dbmover plugin for explicitly running data modification statements after migration

  Sources   Download

MIT

The Requires

 

by Marijn Ophorst

15/04 2017

0.1.1

0.1.1.0

Dbmover plugin for explicitly running data modification statements after migration

  Sources   Download

MIT

The Requires

 

by Marijn Ophorst

15/04 2017

0.1.0

0.1.0.0

Dbmover plugin for explicitly running data modification statements after migration

  Sources   Download

MIT

The Requires

 

by Marijn Ophorst