News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Database Versioning with Ladder Migrations
April 22, 2014 @ 10:48:41

The SitePoint PHP blog has posted another tutorial looking at database versioning (see this postfocusing on Ladder migrations. Ladder is a simple PHP-based way to write migrations with rollbacks in a clear, easy to read format.

Version control systems are invaluable for tracking changes in your code, particularly when you're working in a team. However, most applications don't consist solely of application code. Managing changes to the database has always been a little more challenging, particularly when you're adding new features which require changes to the schema. [...] One solution is to move responsibility for creating and modifying the database schema into code, using migrations. That way, changes can be managed along with the rest of your application, and features we take for granted in version control - such as being able to compare versions and keep an audit trail - can be used for database changes.

He introduces the Ladder tool briefly, shows how to get it installed/configured and gets into writing a first simple migration. It creates a "users" table with two columns and comes with both "up" and "down" methods to make rollbacks easier. Ladder also provides functionality for database seeding, pre-populating the database tables with sample data either from hard-coded values or from a CVS file.

0 comments voice your opinion now!
database migration ladder versioning tutorial project

Link: http://www.sitepoint.com/database-versioning-ladder-migrations

PHP.net:
PHP 5.6.0alpha2 released
February 14, 2014 @ 10:22:48

The second alpha (not for use in production) of the PHP 5.6.x series has been officially announced on the main PHP.net site today.

The PHP development team announces the immediate availability of PHP 5.6.0alpha2. This release adds new features and fixes bugs. All users of PHP are encouraged to test this version carefully, and report any bugs in the bug tracking system. [...] PHP 5.6.0alpha2 comes with a number of new features, including: peer certificates are now verified by default when connecting to SSL/TLS servers, an exponentiation operator has been added: **, and output encoding handling [that] has been simplified by using default_charset as the default character encoding.

If you're looking for more information about what's involved in migrating up to this version, check out the upgrade guide or for just the full list of change take a look at the NEWS file. You can download this alpha release from the PHP QA site (Windows binaries here).

0 comments voice your opinion now!
php56 alpha2 release migration guide news download language

Link: http://php.net/index.php#id2014-02-13-1

Etsy Code as Craft:
There and Back Again Migrating Geolocation Data to GeoNames
April 01, 2013 @ 11:48:36

On the Etsy "Code as Craft" blog there's a recent post about their move to using the GeoNames service internally rather than the external, third-party API previously in use.

People are passionate about where they live. At Etsy we need to keep track of lots of different locations, such as buyers' billing and shipping addresses and sellers' shop locations. As Etsy continues to expand internationally we wanted to provide better localization and translations for our location place names. We determined that the best way to effect this change was to move from using a closed location API provider to internal services backed by the open GeoNames data set.

The post details some of the steps in the process including the mapping of the current data to the new structure (the script is available on github). They talk about how they mapped their old data over (trial and error sometimes) and the creation of a database of "GeoNameIDs" for each customer in their records. They've also implemented a Lucene/Solr search for improved searching and auto-suggestion based on the user's location.

0 comments voice your opinion now!
data migration geonames geolocation api script


Zend Framework Blog:
Zend Framework 1 is Migrating to Git!
March 28, 2013 @ 09:29:23

The Zend Framework project has announced a major move for the framework's development - the Zend Framework v1 repositories will be moving from Subversion to Git over the next year or so.

Since its inception, Zend Framework 1 has used Subversion for versioning. However, as we approach its end-of-life (which will occur 12-18 months from the time this post is written), and as our experience with ZF2 processes becomes more familiar, we -- the Zend team and the Community Review team -- feel that we can better support ZF1 via GitHub. As such, we will be migrating the ZF1 Subversion repository to GitHub this week. Please read on for details!

The post details the steps that'll be taken during the process including the changing of the location of the "master" branch (and how to change svn to point to it) and the updates to the integration of the Dojo libraries. They also talk some about the "extras" repository and how things will work with the Issue Tracker and pull requests in the future.

The repository and issues migration is the first step in a series of planned migrations. We also plan to eventually migrate our wiki to GitHub; this will allow us to offload functionality from the main ZF website, and also consolidate all development-related functionality (other than the mailing list) in a central location.
0 comments voice your opinion now!
zendframework1 git migration subversion github


PHPMaster.com:
PHPFog is Coming to an End - But Don't Panic!
November 27, 2012 @ 09:40:57

If you're a PHPFog user, you know that they're discontinuing the service in favor of their AppFog product. If you're looking to migrate over to this from PHPFog, you should check out this new article from PHPMaster.com with some of the differences between the two services.

Have you heard PHPFog is coming to an end? No, well - it is. That's right, in a recent announcement on their mailing list, the company has said that PHPFog will be no more by the end of January, 2013. But if you're on their platform, don't panic! The new, combined platform may be even better than what you're accustomed to with them now.

He talks about some of the things that are different including the technologies it employs, addons it provides, the differing deployment process and when teh final cut-off date is. He links to their own migration guide for most of the steps but mentions one specific change that might trip you up - the change to store connection information in the "VCAP_SERVICES" environment variable.

0 comments voice your opinion now!
phpfog appfog migration differences guide database


Rob Morgan:
Getting Started With Phinx
October 18, 2012 @ 12:30:49

Rob Morgan has a recent post showing you how to use Phinx, a PHP-based database migration tool, to handle your database changes (both "up" and "down").

Earlier this year I decided to open-source one of my personal software projects - Phinx. Phinx is a database migration tool (think Ruby on Rails ActiveRecord migrations) where can you describe all of your database transformations in pure PHP. I have used this tool for many of my consulting projects, however it still took a lot of effort to turn it into a re-usable product. In this tutorial I'm going to explain how to install Phinx and use it with a simple guestbook application.

He uses a sample guestbook project for his example, showing how to get it all installed and how to create a migration that adds a "posts" table.

0 comments voice your opinion now!
phinx database migration tutorial introduction guestbook


PHPMaster.com:
Artisan and Laravel Migrations
August 28, 2012 @ 08:38:08

PHPMaster.com has continued their series about the Laravel framework today with this new tutorial they show you how to use the command line tool Artisan to work with database migrations.

For those who struggle with maintaining their database schema, or who have problems applying updates and often revert them, there is a solution. Laravel, the MVC framework which I wrote about previously, offers you migrations.

On the surface, the migrations are simple sets of "up" and "down" methods that allow you to apply and remove the changes required for the migration. It also allows you to perform a "rollback" on the updates just made and a "reset" to clear out all changes and start over from the base. There's also a shortcut to help generate migration code from a configuration string.

0 comments voice your opinion now!
laravel migration framework database tutorial


Stefan Koopmanschap:
Data migration with Doctrine2
July 25, 2012 @ 08:18:32

In this latest post to his site Stefan Koopmanschap shares a solution he's found to migrating data with Doctrine2 from an existing structure.

A project that I'm working on right now required me to migrate data from the existing database to the new database and database structure. Since the application is built on top of Symfony2, I decided to write a Command that would take care of the migration. I ran into an issue though: Doctrine2 insisted on creating new IDs where I wanted to keep the old one. The solution turned out to be really simple.

The actual code for the Command is only a few lines long - it just turns off the "AUTO" strategy for each of your entities, making it ignore any IDs you have set on the entity already.

0 comments voice your opinion now!
data migration doctrine2 strategy auto tutorial


Leaseweb Labs Blog:
Migration to Symfony2 continued
February 09, 2012 @ 11:51:59

On the LeaseWeb Labs blog there's a continuation from a previous post about migrating your Symfony1 application over to Symfony2. In the first part of this series of posts, Stefan Koopmanschap talked about wrapping your code to make it work. In this second post, Maurtis van der Schee tackles two issues Stefan mentioned - performance problems and handling authorization/authentication.

On December 21, 2011 Stefan Koopmanschap wrote an excellent article on this blog titled "Painless (well, less painful) migration to Symfony2." [...] We were very much inspired by his passionate elucidation and we were fully convinced of the urge to start migrating to Symfony2 as soon as possible. However, he also provided us with a "A word of caution" about 2 things: performance and authentication/authorization. This might get some people worried, but not us: it challenged us to find a solution for those two open issues.

They explain why these two things are a problem and some of their solutions they've created - a .htaccess for routing and manually replicating the Symfony2 session in the Symfony1 code. Included in the post are the rewrite rules and code to make these two things happen (and a small configuration change to make them work).

0 comments voice your opinion now!
symfony2 migration wrapper authentication performance authorization


Dave Marshall's Blog:
Phpmig - Simple migrations for php
November 01, 2011 @ 13:19:02

In a new post to his blog Dave Marshall shares a homegrown migration tool he's created to help make database migrations a simpler task - phpmig.

I've previously blogged about migrations with phing and dbdeploy and also porting ActiveRecord::Migrations to PHP, now here I am again blogging about yet another way of doing migrations in PHP projects. Only maybe this time it's different, maybe this time I've found a way I'm happy with...? Phpmig is a simple migrations system that was written to be easily adopted regardless of the framework or libraries you are using. It requires a little bit of setting up, but if you know you should be using migrations, you're probably more than capable.

He's worked up a sample application to show you how to get things set up and working - a basic Silex-based application. Phpmig is used to create a basic bootstrap for the deployment that includes the use of Pimple for dependency injection and a command-line interface to generate a migration skeleton class for the up/down methods. The source for phpmig can be found on github.

0 comments voice your opinion now!
migration database simple phpmig custom



Community Events





Don't see your event here?
Let us know!


community threedevsandamaybe api language configure interview wordpress developer framework series bugfix introduction application release laravel code unittest podcast install list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework