diff options
-rw-r--r-- | migrations/20150119171459_init_database.php | 11 | ||||
-rw-r--r-- | 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 @@ | |||
3 | use Phinx\Migration\AbstractMigration; | 3 | use Phinx\Migration\AbstractMigration; |
4 | 4 | ||
5 | class InitDatabase extends AbstractMigration | 5 | class InitDatabase extends AbstractMigration |
6 | { | 6 | { |
7 | /** | 7 | /** |
8 | * Migrate Up. | 8 | * Migrate Up. |
9 | */ | 9 | */ |
10 | public function up() | 10 | public function up() |
11 | { | 11 | { |
12 | $this->execute("CREATE TABLE IF NOT EXISTS `montest` ( | 12 | $this->execute("INSERT INTO config (name, value) VALUES ('foo', 'bar');"); |
13 | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
14 | `name` varchar(255) NOT NULL, | ||
15 | `value` varchar(255) NOT NULL, | ||
16 | PRIMARY KEY (`id`) | ||
17 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); | ||
18 | } | 13 | } |
19 | 14 | ||
20 | /** | 15 | /** |
@@ -22,6 +17,6 @@ class InitDatabase extends AbstractMigration | |||
22 | */ | 17 | */ |
23 | public function down() | 18 | public function down() |
24 | { | 19 | { |
25 | $this->execute("DROP DATABASE montest;"); | 20 | $this->execute("DELETE FROM config WHERE name = 'foo' AND value = 'bar';"); |
26 | } | 21 | } |
27 | } \ No newline at end of file | 22 | } \ No newline at end of file |
@@ -6,12 +6,12 @@ environments: | |||
6 | default_database: development | 6 | default_database: development |
7 | production: | 7 | production: |
8 | adapter: sqlite | 8 | adapter: sqlite |
9 | name: db/poche | 9 | name: app/db/poche |
10 | 10 | ||
11 | development: | 11 | development: |
12 | adapter: sqlite | 12 | adapter: sqlite |
13 | name: db/poche | 13 | name: app/db/poche |
14 | 14 | ||
15 | testing: | 15 | testing: |
16 | adapter: sqlite | 16 | adapter: sqlite |
17 | name: db/poche | 17 | name: app/db/poche |