aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations/20150119171459_init_database.php
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/20150119171459_init_database.php')
-rw-r--r--migrations/20150119171459_init_database.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/migrations/20150119171459_init_database.php b/migrations/20150119171459_init_database.php
new file mode 100644
index 00000000..48a7d4b6
--- /dev/null
+++ b/migrations/20150119171459_init_database.php
@@ -0,0 +1,27 @@
1<?php
2
3use Phinx\Migration\AbstractMigration;
4
5class InitDatabase extends AbstractMigration
6{
7 /**
8 * Migrate Up.
9 */
10 public function up()
11 {
12 $this->execute("CREATE TABLE IF NOT EXISTS `montest` (
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 }
19
20 /**
21 * Migrate Down.
22 */
23 public function down()
24 {
25 $this->execute("DROP DATABASE montest;");
26 }
27} \ No newline at end of file