A Ko3 Module For Database Migrations
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
classes
config
examples/authorm
guide/migrate
test
.gitignore
Doxyfile
LICENSE
README.md
TODO
init.php

README.md

K3-Migrate Module

A Ko3 Module by John Hobbs

Introduction

This module provides a DSL and tools for database migrations for Kohana 3.1.x.

It is loosely inspired by Ruby's ActiveRecord::Migration

Caveats

PHP is not a nice language for DSL's, so there are some dirty hacks and it's a bit verbose. Get over it or pick a new language.

Also, be aware that it is totally possible to create SQL statements that just don't work. K3-Migrate is not that bright, it will try to do stupid things if you tell it to (especially with indexes).

Installation

  1. Drop the source in your MODPATH folder.
  2. Add the module to Kohana::modules in your bootstrap.php
  3. Create the directory APPPATH/migrations/

Examples

There are examples in the examples directory.

In K3-Migrate there is usually more than one way to do something, but there are four core statements, outlined below.

Each statement is nested inside of a Migration object's up or down methods.

Contributors