aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-20 07:50:50 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-20 07:50:50 +0100
commit8d6ff10e8e38c13c9ed1916de79a03ccbbdd044d (patch)
tree199ffce0632f9a374567d05adf765b9aa085072d /migrations
parent9a5c1bc62a224b0718b93f7e302692526d49b9b0 (diff)
downloadwallabag-8d6ff10e8e38c13c9ed1916de79a03ccbbdd044d.tar.gz
wallabag-8d6ff10e8e38c13c9ed1916de79a03ccbbdd044d.tar.zst
wallabag-8d6ff10e8e38c13c9ed1916de79a03ccbbdd044d.zip
test for migration
Diffstat (limited to 'migrations')
-rw-r--r--migrations/20150119171459_init_database.php11
1 files changed, 3 insertions, 8 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 @@
3use Phinx\Migration\AbstractMigration; 3use Phinx\Migration\AbstractMigration;
4 4
5class InitDatabase extends AbstractMigration 5class 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