2015-01-20 07:40:39 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
|
|
|
|
class InitDatabase extends AbstractMigration
|
2015-01-20 07:50:50 +01:00
|
|
|
{
|
2015-01-20 07:40:39 +01:00
|
|
|
/**
|
|
|
|
* Migrate Up.
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2015-01-20 07:50:50 +01:00
|
|
|
$this->execute("INSERT INTO config (name, value) VALUES ('foo', 'bar');");
|
2015-01-20 07:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Migrate Down.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2015-01-20 07:50:50 +01:00
|
|
|
$this->execute("DELETE FROM config WHERE name = 'foo' AND value = 'bar';");
|
2015-01-20 07:40:39 +01:00
|
|
|
}
|
|
|
|
}
|