2017 © Pedro Peláez
 

library update-scripts

Allows you to run scripts to update your application, just like migrations

image

seanstewart/update-scripts

Allows you to run scripts to update your application, just like migrations

  • Sunday, March 19, 2017
  • by seanstewart
  • Repository
  • 1 Watchers
  • 2 Stars
  • 962 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

Build Status, (*1)

Laravel Update Scripts

This Laravel 5 package makes it easy to run scripts that modify data in your database or perform other tasks and behaves just like migrations., (*2)

How to install

Pull the package in through Composer., (*3)

"require": {
    "seanstewart/update-scripts": "dev-master"
}

Include the service provider within app/config/app.php., (*4)

'providers' => [
    Seanstewart\UpdateScripts\UpdateScriptsServiceProvider::class
];

Then you will need to run the following command to publish the migration responsilbe for setting up the "updates" table in your database., (*5)

php artisan vendor:publish

After that, you'll need to migrate your database, (*6)

php artisan migrate

How to Use

Let's say you need to run some scripts that modify content in your database. Doing this through migrations isn't a great idea as those should strictly handle changes to the database structure. Run the following command to generate a new update script:, (*7)

php artisan update:make some_description_for_your_update

A file will be generated in your laravel base directory called "updates" that looks like 2016_05_15_145375_some_description_for_your_update.php (again, it works just like migrations)., (*8)

When you're ready to run the update script, you'd call the command...., (*9)

php artisan update:run

That's it! Updates are tracked in your database just like migrations so they don't run more than once., (*10)

Why I created this

Previously we were running updates to our database data in migrations. It just felt dirty, so we decided to build something that handles updates but works just like migrations. We're using it in production for our election building service (Election Runner) and it has made the development/updating process much easier. Hopefully others will find this as useful as we do!, (*11)

The Versions

19/03 2017

dev-master

9999999-dev https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates

19/03 2017

1.2.1

1.2.1.0 https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates

19/03 2017

1.2.0

1.2.0.0 https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates

18/08 2016

1.0.2

1.0.2.0 https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates

16/05 2016

1.0.1

1.0.1.0 https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates

16/05 2016

1.0.0

1.0.0.0 https://github.com/theseanstewart/Plan-Config

Allows you to run scripts to update your application, just like migrations

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sean Stewart

laravel migrations laravel5 updates