From 8d6ff10e8e38c13c9ed1916de79a03ccbbdd044d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jan 2015 07:50:50 +0100 Subject: [PATCH] test for migration --- migrations/20150119171459_init_database.php | 11 +++-------- phinx.yml | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/migrations/20150119171459_init_database.php b/migrations/20150119171459_init_database.php index 48a7d4b6..35fc9e07 100644 --- a/migrations/20150119171459_init_database.php +++ b/migrations/20150119171459_init_database.php @@ -3,18 +3,13 @@ use Phinx\Migration\AbstractMigration; class InitDatabase extends AbstractMigration -{ +{ /** * Migrate Up. */ public function up() { - $this->execute("CREATE TABLE IF NOT EXISTS `montest` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `value` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $this->execute("INSERT INTO config (name, value) VALUES ('foo', 'bar');"); } /** @@ -22,6 +17,6 @@ class InitDatabase extends AbstractMigration */ public function down() { - $this->execute("DROP DATABASE montest;"); + $this->execute("DELETE FROM config WHERE name = 'foo' AND value = 'bar';"); } } \ No newline at end of file diff --git a/phinx.yml b/phinx.yml index f6c6300f..26869443 100644 --- a/phinx.yml +++ b/phinx.yml @@ -6,12 +6,12 @@ environments: default_database: development production: adapter: sqlite - name: db/poche + name: app/db/poche development: adapter: sqlite - name: db/poche + name: app/db/poche testing: adapter: sqlite - name: db/poche + name: app/db/poche -- 2.41.0